Struct salsa::QueryTable[][src]

pub struct QueryTable<'me, Q> where
    Q: Query
{ /* fields omitted */ }
Expand description

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

Implementations

impl<'me, Q> QueryTable<'me, Q> where
    Q: Query,
    Q::Storage: QueryStorageOps<Q>, 
[src]

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

Constructs a new QueryTable.

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, 
[src]

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

pub fn purge(&self) where
    Q::Storage: QueryStorageMassOps, 
[src]

Completely clears the storage for this query.

This method breaks internal invariants of salsa, so any further queries might return nonsense results. It is useful only in very specific circumstances – for example, when one wants to observe which values dropped together with the table

Trait Implementations

impl<'d, Q> DebugQueryTable for QueryTable<'_, Q> where
    Q: Query,
    Q::Storage: QueryStorageOps<Q>, 
[src]

type Key = Q::Key

Key of this query.

type Value = Q::Value

Value of this query.

fn durability(&self, key: Q::Key) -> Durability[src]

Returns a lower bound on the durability for the given key. This is typically the minimum durability of all values that the query accessed, but we may return a lower durability in some cases. Read more

fn entries<C>(&self) -> C where
    C: FromIterator<TableEntry<Self::Key, Self::Value>>, 
[src]

Get the (current) set of the entries in the query table.

Auto Trait Implementations

impl<'me, Q> RefUnwindSafe for QueryTable<'me, Q> where
    <Q as QueryDb<'me>>::DynDb: RefUnwindSafe,
    <Q as Query>::Storage: RefUnwindSafe

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

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

impl<'me, Q> Unpin for QueryTable<'me, Q>

impl<'me, Q> UnwindSafe for QueryTable<'me, Q> where
    <Q as QueryDb<'me>>::DynDb: RefUnwindSafe,
    <Q as Query>::Storage: RefUnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.