pub struct OccupiedEntry<'a, K: DirectKey, V> { /* private fields */ }Available on crate feature
concurrent only.Expand description
An occupied entry holding its page’s write lock.
Implementations§
Source§impl<'a, K: DirectKey, V> OccupiedEntry<'a, K, V>
impl<'a, K: DirectKey, V> OccupiedEntry<'a, K, V>
Sourcepub fn into_ref(self) -> DirectMapRefMut<'a, K, V>
pub fn into_ref(self) -> DirectMapRefMut<'a, K, V>
Converts the entry into a mutable guard, retaining the page write lock.
Sourcepub fn insert(&mut self, value: V) -> V
pub fn insert(&mut self, value: V) -> V
Replaces only the value, returning the previous value and keeping the stored key.
Sourcepub fn remove_entry(self) -> (K, V)
pub fn remove_entry(self) -> (K, V)
Removes the pair and returns it after releasing the page lock.
Auto Trait Implementations§
impl<'a, K, V> !Send for OccupiedEntry<'a, K, V>
impl<'a, K, V> Forget for OccupiedEntry<'a, K, V>
impl<'a, K, V> Freeze for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: Freeze,
impl<'a, K, V> Move for OccupiedEntry<'a, K, V>
impl<'a, K, V> RefUnwindSafe for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: RefUnwindSafe,
impl<'a, K, V> Sync for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: Sync,
impl<'a, K, V> Unpin for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: Unpin,
impl<'a, K, V> UnsafeUnpin for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: UnsafeUnpin,
impl<'a, K, V> UnwindSafe for OccupiedEntry<'a, K, V>where
DirectMapRefMut<'a, K, V>: UnwindSafe,
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
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