pub struct RcuCacheGuard<'a, K, V, S = RapidBuildHasher>where
K: Eq + Hash + Clone + Send + Sync + 'static,
V: Clone + Send + Sync + 'static,
S: BuildHasher + Send + Sync + 'static,{ /* private fields */ }Implementations§
Source§impl<'a, K, V, S> RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S> RcuCacheGuard<'a, K, V, S>
pub fn get<'rcu>(&self, scope: &'rcu RcuReadScope, key: &K) -> Option<&'rcu V>
Sourcepub fn insert(
&self,
scope: &RcuReadScope,
key: K,
value: V,
) -> RcuCacheInsertionResult<V>
pub fn insert( &self, scope: &RcuReadScope, key: K, value: V, ) -> RcuCacheInsertionResult<V>
Inserts a key-value pair into the cache.
If the cache exceeds its capacity, entries are evicted in a FIFO manner.
Auto Trait Implementations§
impl<'a, K, V, S> Freeze for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !RefUnwindSafe for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !Send for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S> Sync for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S> Unpin for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S> UnsafeUnpin for RcuCacheGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !UnwindSafe for RcuCacheGuard<'a, K, V, S>
Blanket Implementations§
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<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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