[−][src]Struct salsa::QueryTableMut
Return value from the query_mut
method on Database
.
Gives access to the set
method, notably, that is used to
set the value of an input query.
Methods
impl<'me, DB, Q> QueryTableMut<'me, DB, Q> where
DB: GetQueryTable<Q>,
Q: Query<DB> + 'me,
[src]
DB: GetQueryTable<Q>,
Q: Query<DB> + 'me,
impl<'_, DB, Q> QueryTableMut<'_, DB, Q> where
DB: GetQueryTable<Q>,
Q: Query<DB>,
[src]
DB: GetQueryTable<Q>,
Q: Query<DB>,
pub fn set(&self, key: Q::Key, value: Q::Value) where
Q::Storage: InputQueryStorageOps<DB, Q>,
[src]
Q::Storage: InputQueryStorageOps<DB, Q>,
Assign a value to an "input query". Must be used outside of an active query computation.
If you are using snapshot
, see the notes on blocking
and cancellation on the query_mut
method.
pub fn set_with_durability(
&self,
key: Q::Key,
value: Q::Value,
durability: Durability
) where
Q::Storage: InputQueryStorageOps<DB, Q>,
[src]
&self,
key: Q::Key,
value: Q::Value,
durability: Durability
) where
Q::Storage: InputQueryStorageOps<DB, Q>,
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.
If you are using snapshot
, see the notes on blocking
and cancellation on the query_mut
method.
pub fn set_lru_capacity(&self, cap: usize) where
Q::Storage: LruQueryStorageOps,
[src]
Q::Storage: LruQueryStorageOps,
Sets the size of LRU cache of values for this query table.
That is, at most cap
values will be preset in the table at the same
time. This helps with keeping maximum memory usage under control, at the
cost of potential extra recalculations of evicted values.
If cap
is zero, all values are preserved, this is the default.
pub fn invalidate(&self, key: &Q::Key) where
Q::Storage: DerivedQueryStorageOps<DB, Q>,
[src]
Q::Storage: DerivedQueryStorageOps<DB, Q>,
Marks the computed value as outdated.
This causes salsa to re-execute the query function on the next access to the query, even if all dependencies are up to date.
This is most commonly used for invaliding on-demand inputs; see the Salsa Book for more information.
Auto Trait Implementations
impl<'me, DB, Q> Send for QueryTableMut<'me, DB, Q> where
DB: Sync,
<Q as Query<DB>>::Storage: Sync,
DB: Sync,
<Q as Query<DB>>::Storage: Sync,
impl<'me, DB, Q> Unpin for QueryTableMut<'me, DB, Q>
impl<'me, DB, Q> Sync for QueryTableMut<'me, DB, Q> where
DB: Sync,
<Q as Query<DB>>::Storage: Sync,
DB: Sync,
<Q as Query<DB>>::Storage: Sync,
impl<'me, DB, Q> UnwindSafe for QueryTableMut<'me, DB, Q> where
DB: RefUnwindSafe,
<Q as Query<DB>>::Storage: RefUnwindSafe,
DB: RefUnwindSafe,
<Q as Query<DB>>::Storage: RefUnwindSafe,
impl<'me, DB, Q> RefUnwindSafe for QueryTableMut<'me, DB, Q> where
DB: RefUnwindSafe,
<Q as Query<DB>>::Storage: RefUnwindSafe,
DB: RefUnwindSafe,
<Q as Query<DB>>::Storage: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,