[][src]Struct salsa::QueryTable

pub struct QueryTable<'me, DB, Q> where
    DB: GetQueryTable<Q>,
    Q: Query<DB> + 'me, 
{ /* fields omitted */ }

Return value from [the query method] on Database. Gives access to various less common operations on queries.

Methods

impl<'me, DB, Q> QueryTable<'me, DB, Q> where
    DB: GetQueryTable<Q>,
    Q: Query<DB> + 'me, 
[src]

pub fn new(db: &'me DB, storage: &'me Q::Storage) -> Self[src]

Constructs a new QueryTable.

impl<DB, Q, '_> QueryTable<'_, DB, Q> where
    DB: GetQueryTable<Q>,
    Q: Query<DB>, 
[src]

pub fn get(&self, key: Q::Key) -> Q::Value[src]

Execute the query on a given input. Usually it's easier to invoke the trait method directly. Note that for variadic queries (those with no inputs, or those with more than one input) the key will be a tuple.

pub fn sweep(&self, strategy: SweepStrategy) where
    Q::Storage: QueryStorageMassOps<DB>, 
[src]

Remove all values for this query that have not been used in the most recent revision.

Trait Implementations

impl<DB, Q, '_> DebugQueryTable for QueryTable<'_, DB, Q> where
    DB: GetQueryTable<Q>,
    Q: Query<DB>, 
[src]

type Key = Q::Key

Key of this query.

type Value = Q::Value

Value of this query.

Auto Trait Implementations

impl<'me, DB, Q> Send for QueryTable<'me, DB, Q> where
    DB: Sync,
    <Q as Query<DB>>::Storage: Sync

impl<'me, DB, Q> Sync for QueryTable<'me, DB, Q> where
    DB: Sync,
    <Q as Query<DB>>::Storage: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T