Struct salsa::QueryTable

source ·
pub struct QueryTable<'me, DB, Q>where
    DB: Database + 'me,
    Q: Query<DB> + 'me,
{ /* private fields */ }

Implementations

Constructs a new QueryTable.

Assign a value to an “input query”. Must be used outside of an active query computation.

Assign a value to an “input query”, with the additional promise that this value will never change. Must be used outside of an active query computation.

Assigns a value to the query bypassing the normal incremental checking – this value becomes the value for the query in the current revision. This can even be used on “derived” queries (so long as their results are memoized).

Note that once set_unchecked is used, the result is effectively “fixed” for all future revisions. This “mocking” system is pretty primitive and subject to revision; see salsa-rs/salsa#34 for more details.

This is only meant to be used for “mocking” purposes in tests – when testing a given query, you can use set_unchecked to assign the values for its various inputs and thus control what it sees when it executes.

Trait Implementations

True if salsa thinks that the value for key is a constant, meaning that it can never change, no matter what values the inputs take on from this point. Read more
Get the (current) set of the keys in the query table.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.