pub trait Database: DatabaseStorageTypes {
fn salsa_runtime(&self) -> &Runtime<Self>;
fn query<Q>(&self, query: Q) -> QueryTable<'_, Self, Q>
where
Q: Query<Self>,
Self: GetQueryTable<Q>,
{ ... }
}
Expand description
The base trait which your “query context” must implement. Gives access to the salsa runtime, which you must embed into your query context (along with whatever other state you may require).
Required Methods
sourcefn salsa_runtime(&self) -> &Runtime<Self>
fn salsa_runtime(&self) -> &Runtime<Self>
Gives access to the underlying salsa runtime.
Provided Methods
sourcefn query<Q>(&self, query: Q) -> QueryTable<'_, Self, Q>where
Q: Query<Self>,
Self: GetQueryTable<Q>,
fn query<Q>(&self, query: Q) -> QueryTable<'_, Self, Q>where
Q: Query<Self>,
Self: GetQueryTable<Q>,
Get access to extra methods pertaining to a given query,
notably set
(for inputs).