pub struct RcuHashMapGuard<'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 */ }Expand description
A guard that provides exclusive access to the RcuHashMap.
Implementations§
Source§impl<'a, K, V, S> RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S> RcuHashMapGuard<'a, K, V, S>
Sourcepub fn get<Q>(&self, key: &Q) -> Option<V>
pub fn get<Q>(&self, key: &Q) -> Option<V>
Returns a copy (clone) of the value associated with the given key, if it exists.
Sourcepub fn drain<'b>(&'b mut self) -> impl Iterator<Item = (K, V)> + 'b
pub fn drain<'b>(&'b mut self) -> impl Iterator<Item = (K, V)> + 'b
Removes all values from the map and returns them.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns true if the map contains a value for the specified key.
Auto Trait Implementations§
impl<'a, K, V, S> Freeze for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !RefUnwindSafe for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !Send for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S> Sync for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S> Unpin for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S> UnsafeUnpin for RcuHashMapGuard<'a, K, V, S>
impl<'a, K, V, S = BuildHasherDefault<RapidHasher>> !UnwindSafe for RcuHashMapGuard<'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