pub struct LastValCacheStore<S>where
S: StoreBase,{ /* private fields */ }Expand description
A OrderedStore that caches the last value in memory
If you need to call OrderedStoreRead::last as lot, this will speed up access
Implementations§
Trait Implementations§
Source§impl<S> AppendableStore for LastValCacheStore<S>
impl<S> AppendableStore for LastValCacheStore<S>
Source§impl<S> AsyncAppendableStore for LastValCacheStore<S>
impl<S> AsyncAppendableStore for LastValCacheStore<S>
Source§impl<S> AsyncOrderedStoreRead for LastValCacheStore<S>
impl<S> AsyncOrderedStoreRead for LastValCacheStore<S>
Source§impl<S> AsyncSearchableStoreRead for LastValCacheStore<S>
impl<S> AsyncSearchableStoreRead for LastValCacheStore<S>
Source§async fn filter(
&self,
pred: impl FnMut(&Self::Key, &Self::Value) -> bool,
) -> Vec<(Self::Key, Self::Value)>
async fn filter( &self, pred: impl FnMut(&Self::Key, &Self::Value) -> bool, ) -> Vec<(Self::Key, Self::Value)>
Search for all entries in the store, that fulfill a certain predicate Read more
async fn find( &self, pred: impl FnMut(&Self::Key, &Self::Value) -> bool, ) -> Option<(Self::Key, Self::Value)>
Source§impl<S> AsyncStoreRead for LastValCacheStore<S>where
S: AsyncStoreRead<Key: Clone>,
impl<S> AsyncStoreRead for LastValCacheStore<S>where
S: AsyncStoreRead<Key: Clone>,
Source§impl<S> AsyncStoreWrite for LastValCacheStore<S>where
S: AsyncStoreWrite<Key: Clone>,
impl<S> AsyncStoreWrite for LastValCacheStore<S>where
S: AsyncStoreWrite<Key: Clone>,
Source§impl<S> Deref for LastValCacheStore<S>where
S: StoreBase,
impl<S> Deref for LastValCacheStore<S>where
S: StoreBase,
Source§impl<S> DerefMut for LastValCacheStore<S>where
S: StoreBase,
impl<S> DerefMut for LastValCacheStore<S>where
S: StoreBase,
Source§impl<S> OrderedStoreRead for LastValCacheStore<S>
impl<S> OrderedStoreRead for LastValCacheStore<S>
Source§impl<S> SearchableStoreRead for LastValCacheStore<S>
impl<S> SearchableStoreRead for LastValCacheStore<S>
Source§fn filter(
&self,
pred: impl FnMut(&Self::Key, &Self::Value) -> bool,
) -> Vec<(Self::Key, Self::Value)>
fn filter( &self, pred: impl FnMut(&Self::Key, &Self::Value) -> bool, ) -> Vec<(Self::Key, Self::Value)>
Search for all entries in the store, that fulfill a certain predicate Read more
fn find( &self, pred: impl FnMut(&Self::Key, &Self::Value) -> bool, ) -> Option<(Self::Key, Self::Value)>
Source§impl<S> StoreBase for LastValCacheStore<S>where
S: StoreBase,
impl<S> StoreBase for LastValCacheStore<S>where
S: StoreBase,
Source§impl<S> StoreRead for LastValCacheStore<S>where
S: StoreRead,
impl<S> StoreRead for LastValCacheStore<S>where
S: StoreRead,
Auto Trait Implementations§
impl<S> !Freeze for LastValCacheStore<S>
impl<S> !RefUnwindSafe for LastValCacheStore<S>
impl<S> !Sync for LastValCacheStore<S>
impl<S> Send for LastValCacheStore<S>
impl<S> Unpin for LastValCacheStore<S>
impl<S> UnsafeUnpin for LastValCacheStore<S>
impl<S> UnwindSafe for LastValCacheStore<S>
Blanket Implementations§
impl<T> AsyncOrderedStore for Twhere
T: AsyncOrderedStoreRead + AsyncStoreWrite,
impl<T> AsyncSearchableStore for Twhere
T: AsyncSearchableStoreRead + AsyncStoreWrite,
impl<T> AsyncStore for Twhere
T: AsyncStoreRead + AsyncStoreWrite,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more