Enum double_map::Entry
source · [−]pub enum Entry<'a, K1: 'a, K2: 'a, V: 'a> {
Occupied(OccupiedEntry<'a, K1, K2, V>),
Vacant(VacantEntry<'a, K1, K2, V>),
}Expand description
Variants
Occupied(OccupiedEntry<'a, K1, K2, V>)
An occupied entry.
Vacant(VacantEntry<'a, K1, K2, V>)
A vacant entry.
Implementations
sourceimpl<'a, K1, K2, V> Entry<'a, K1, K2, V> where
K1: Eq + Hash + Clone,
K2: Eq + Hash + Clone,
impl<'a, K1, K2, V> Entry<'a, K1, K2, V> where
K1: Eq + Hash + Clone,
K2: Eq + Hash + Clone,
pub fn or_insert(self, default: V) -> &'a mut V
pub fn or_insert_with<F: FnOnce() -> V>(self, default: F) -> &'a mut V
pub fn or_insert_with_key1<F: FnOnce(&K1) -> V>(self, default: F) -> &'a mut V
pub fn or_insert_with_key2<F: FnOnce(&K2) -> V>(self, default: F) -> &'a mut V
pub fn or_insert_with_keys<F: FnOnce(&K1, &K2) -> V>(
self,
default: F
) -> &'a mut V
pub fn key1(&self) -> &K1
pub fn key2(&self) -> &K2
pub fn keys(&self) -> (&K1, &K2)
pub fn and_modify<F>(self, f: F) -> Self where
F: FnOnce(&mut V),
Trait Implementations
Auto Trait Implementations
impl<'a, K1, K2, V> RefUnwindSafe for Entry<'a, K1, K2, V> where
K1: RefUnwindSafe,
K2: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K1, K2, V> Send for Entry<'a, K1, K2, V> where
K1: Send,
K2: Send,
V: Send,
impl<'a, K1, K2, V> Sync for Entry<'a, K1, K2, V> where
K1: Sync,
K2: Sync,
V: Sync,
impl<'a, K1, K2, V> Unpin for Entry<'a, K1, K2, V> where
K1: Unpin,
K2: Unpin,
impl<'a, K1, K2, V> !UnwindSafe for Entry<'a, K1, K2, V>
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