[−][src]Struct gluon_salsa::QueryTable
Return value from the query
method on Database
.
Gives access to various less common operations on queries.
Implementations
impl<'me, Q> QueryTable<'me, Q, &'me <Q as QueryDb<'me>>::DynDb> where
Q: Query,
Q::Storage: QueryStorageOps<Q>,
[src]
Q: Query,
Q::Storage: QueryStorageOps<Q>,
pub fn new(
db: &'me <Q as QueryDb<'me>>::DynDb,
storage: Arc<Q::Storage>
) -> Self
[src]
db: &'me <Q as QueryDb<'me>>::DynDb,
storage: Arc<Q::Storage>
) -> Self
Constructs a new QueryTable
.
impl<'me, Q> QueryTable<'me, Q, <Q as QueryDb<'me>>::Db> where
Q: Query,
Q::Storage: QueryStorageOps<Q>,
[src]
Q: Query,
Q::Storage: QueryStorageOps<Q>,
pub fn new_async(db: <Q as QueryDb<'me>>::Db, storage: Arc<Q::Storage>) -> Self
[src]
Constructs a new QueryTable
.
impl<'me, Q> QueryTable<'me, Q, &'me <Q as QueryDb<'me>>::DynDb> where
Q: Query,
Q::Storage: QueryStorageOps<Q>,
[src]
Q: Query,
Q::Storage: QueryStorageOps<Q>,
pub fn sweep(&self, strategy: SweepStrategy) where
Q::Storage: QueryStorageMassOps,
[src]
Q::Storage: QueryStorageMassOps,
Remove all values for this query that have not been used in the most recent revision.
pub fn peek(&self, key: &Q::Key) -> Option<Q::Value>
[src]
Peeks at the value at Q::Key
. If it is currently in cache then it returns
Some
, otherwise None
impl<'me, Q> QueryTable<'me, Q, <Q as QueryDb<'me>>::Db> where
Q: Query,
Q::Storage: QueryStorageOpsSync<Q>,
[src]
Q: Query,
Q::Storage: QueryStorageOpsSync<Q>,
pub fn get(&mut 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.
impl<'me, Q> QueryTable<'me, Q, <Q as QueryDb<'me>>::Db> where
Q: QueryBase,
Q::Key: Send + Sync,
Q::Value: Send + Sync,
Q::Storage: QueryStorageOpsAsync<Q>,
Q: for<'f, 'd> AsyncQueryFunction<'f, 'd>,
[src]
Q: QueryBase,
Q::Key: Send + Sync,
Q::Value: Send + Sync,
Q::Storage: QueryStorageOpsAsync<Q>,
Q: for<'f, 'd> AsyncQueryFunction<'f, 'd>,
pub async fn get_async<'_>(&'_ mut 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 purge(&self) where
Q::Storage: QueryStorageMassOps,
[src]
Q::Storage: QueryStorageMassOps,
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<'me, Q> DebugQueryTable for QueryTable<'me, Q, &'me <Q as QueryDb<'me>>::DynDb> where
Q: Query,
Q::Storage: QueryStorageOps<Q>,
[src]
Q: Query,
Q::Storage: QueryStorageOps<Q>,
type Key = Q::Key
Key of this query.
type Value = Q::Value
Value of this query.
fn durability(&self, key: Q::Key) -> Durability
[src]
fn entries<C>(&self) -> C where
C: FromIterator<TableEntry<Self::Key, Self::Value>>,
[src]
C: FromIterator<TableEntry<Self::Key, Self::Value>>,
Auto Trait Implementations
impl<'me, Q, DB> RefUnwindSafe for QueryTable<'me, Q, DB> where
DB: RefUnwindSafe,
<Q as QueryBase>::Storage: RefUnwindSafe,
DB: RefUnwindSafe,
<Q as QueryBase>::Storage: RefUnwindSafe,
impl<'me, Q, DB> Send for QueryTable<'me, Q, DB> where
DB: Send,
<Q as QueryBase>::Storage: Send + Sync,
DB: Send,
<Q as QueryBase>::Storage: Send + Sync,
impl<'me, Q, DB> Sync for QueryTable<'me, Q, DB> where
DB: Sync,
<Q as QueryBase>::Storage: Send + Sync,
DB: Sync,
<Q as QueryBase>::Storage: Send + Sync,
impl<'me, Q, DB> Unpin for QueryTable<'me, Q, DB> where
DB: Unpin,
DB: Unpin,
impl<'me, Q, DB> UnwindSafe for QueryTable<'me, Q, DB> where
DB: UnwindSafe,
<Q as QueryBase>::Storage: RefUnwindSafe,
DB: UnwindSafe,
<Q as QueryBase>::Storage: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,