pub struct OccupiedEntry<'a, K, V, Codec = Default> { /* private fields */ }👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
Expand description
A view into an occupied entry in an observable hash map.
Implementations§
Source§impl<'a, K, V, Codec> OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec> OccupiedEntry<'a, K, V, Codec>
Sourcepub fn key(&self) -> &K
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn key(&self) -> &K
Gets a reference to the key in the entry.
Sourcepub fn remove_entry(self) -> (K, V)
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn remove_entry(self) -> (K, V)
Take the ownership of the key and value from the map.
A HashMapEvent::Remove change event is sent.
Sourcepub fn get(&self) -> &V
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn get(&self) -> &V
Gets a reference to the value in the entry.
Sourcepub fn get_mut(&mut self) -> RefMut<'_, K, V, Codec>
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn get_mut(&mut self) -> RefMut<'_, K, V, Codec>
Gets a mutable reference to the value in the entry.
Sourcepub fn into_mut(self) -> RefMut<'a, K, V, Codec>
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn into_mut(self) -> RefMut<'a, K, V, Codec>
Converts this into a mutable reference to the value in the entry with a lifetime bound to the map itself.
Sourcepub fn insert(&mut self, value: V) -> V
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn insert(&mut self, value: V) -> V
Sets the value of the entry, and returns the entry’s old value.
A HashMapEvent::Set change event is sent.
Sourcepub fn remove(self) -> V
👎Deprecated: remoc-obs has been integrated into remoc as module remoc::robs. Please update your references.
pub fn remove(self) -> V
Takes the value out of the entry, and returns it.
A HashMapEvent::Remove change event is sent.
Trait Implementations§
Auto Trait Implementations§
impl<'a, K, V, Codec> Freeze for OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec = Default> !RefUnwindSafe for OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec = Default> !Send for OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec = Default> !Sync for OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec> Unpin for OccupiedEntry<'a, K, V, Codec>
impl<'a, K, V, Codec = Default> !UnwindSafe for OccupiedEntry<'a, K, V, Codec>
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