pub trait OccupiedEntry<'a, T: ?Sized + GetEntry<'a>> {
// Required methods
fn key(&self) -> &T::Key;
fn get(&self) -> &T::Value;
fn get_mut(&mut self) -> &mut T::Value;
fn insert(&mut self, value: T::Value) -> T::Value;
fn into_mut(self) -> &'a mut T::Value;
fn remove_entry(self) -> (T::Key, T::Value);
}
Expand description
A trait for an entry with a value.
Required Methods§
Sourcefn insert(&mut self, value: T::Value) -> T::Value
fn insert(&mut self, value: T::Value) -> T::Value
Inserts the given value into this entry, returning the old value.
Sourcefn into_mut(self) -> &'a mut T::Value
fn into_mut(self) -> &'a mut T::Value
Consumes this entry handle, yielding a mutable reference to its value.
Sourcefn remove_entry(self) -> (T::Key, T::Value)
fn remove_entry(self) -> (T::Key, T::Value)
Removes this entry, returning both its key and value.