pub trait OccupiedMapEntry {
type Value;
// Required methods
fn get(&self) -> &Self::Value;
fn get_mut(&mut self) -> &mut Self::Value;
fn into_mut<'a>(self) -> &'a mut Self::Value
where Self: 'a;
fn replace(&mut self, value: Self::Value) -> Self::Value;
fn remove(self) -> Self::Value;
}Expand description
A trait for occupied map entry types.
Required Associated Types§
Required Methods§
Sourcefn get_mut(&mut self) -> &mut Self::Value
fn get_mut(&mut self) -> &mut Self::Value
Gets a mutable reference to the value stored by the entry.
Sourcefn into_mut<'a>(self) -> &'a mut Self::Valuewhere
Self: 'a,
fn into_mut<'a>(self) -> &'a mut Self::Valuewhere
Self: 'a,
Converts the map entry into a mutable reference to the stored value with a lifetime of the map itself.
Implementations on Foreign Types§
Source§impl<'a, K, V> OccupiedMapEntry for OccupiedEntry<'a, K, V>
Available on crate features std or indexmap only.
impl<'a, K, V> OccupiedMapEntry for OccupiedEntry<'a, K, V>
Available on crate features
std or indexmap only.Source§impl<'a, K, V> OccupiedMapEntry for OccupiedEntry<'a, K, V>
Available on crate features std or indexmap only.
impl<'a, K, V> OccupiedMapEntry for OccupiedEntry<'a, K, V>
Available on crate features
std or indexmap only.Source§impl<'a, K: Copy + Eq + Ord + Debug + 'static, T> OccupiedMapEntry for OccupiedEntry<'a, K, T>
Available on crate feature alloc only.
impl<'a, K: Copy + Eq + Ord + Debug + 'static, T> OccupiedMapEntry for OccupiedEntry<'a, K, T>
Available on crate feature
alloc only.