mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-05 11:25:15 +00:00
some more comments
This commit is contained in:
parent
9b4267f7c1
commit
16563b3666
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,8 @@ pub struct QueryContextImpl {
|
||||||
execution_stack: RefCell<Vec<DynDescriptor>>,
|
execution_stack: RefCell<Vec<DynDescriptor>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is an example of how you "link up" all the queries in your
|
||||||
|
// application.
|
||||||
query_context_storage! {
|
query_context_storage! {
|
||||||
struct QueryContextImplStorage for storage in QueryContextImpl {
|
struct QueryContextImplStorage for storage in QueryContextImpl {
|
||||||
impl class_table::ClassTableQueryContext {
|
impl class_table::ClassTableQueryContext {
|
||||||
|
@ -25,12 +27,17 @@ query_context_storage! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is an example of how you provide custom bits of stuff that
|
||||||
|
// your queries may need; in this case, an `Interner` value.
|
||||||
impl CompilerQueryContext for QueryContextImpl {
|
impl CompilerQueryContext for QueryContextImpl {
|
||||||
fn interner(&self) -> &Interner {
|
fn interner(&self) -> &Interner {
|
||||||
&self.interner
|
&self.interner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: This code... probably should not live here. But maybe we
|
||||||
|
// just want to provide some helpers or something? I do suspect I want
|
||||||
|
// people to be able to customize this.
|
||||||
impl BaseQueryContext for QueryContextImpl {
|
impl BaseQueryContext for QueryContextImpl {
|
||||||
type QueryDescriptor = DynDescriptor;
|
type QueryDescriptor = DynDescriptor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue