Struct remoc_obs::hash_map::OccupiedEntry
source · [−]pub struct OccupiedEntry<'a, K, V, Codec = Default> { /* private fields */ }Expand description
A view into an occupied entry in an observable hash map.
Implementations
sourceimpl<'a, K, V, Codec> OccupiedEntry<'a, K, V, Codec> where
K: Clone + RemoteSend,
V: Clone + RemoteSend,
Codec: Codec,
impl<'a, K, V, Codec> OccupiedEntry<'a, K, V, Codec> where
K: Clone + RemoteSend,
V: Clone + RemoteSend,
Codec: Codec,
sourcepub fn remove_entry(self) -> (K, V)
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_mut(&mut self) -> RefMut<'_, K, V, Codec>
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>
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
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
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 = 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> where
K: Unpin,
impl<'a, K, V, Codec = Default> !UnwindSafe for OccupiedEntry<'a, K, V, Codec>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
