Struct double_map::OccupiedEntry
source · [−]pub struct OccupiedEntry<'a, K1: 'a, K2: 'a, V: 'a> { /* private fields */ }Expand description
A view into an occupied entry in a DHashMap.
It is part of the Entry enum and OccupiedError struct.
Implementations
sourceimpl<'a, K1, K2, V> OccupiedEntry<'a, K1, K2, V> where
K1: Eq + Hash + Clone,
K2: Eq + Hash + Clone,
impl<'a, K1, K2, V> OccupiedEntry<'a, K1, K2, V> where
K1: Eq + Hash + Clone,
K2: Eq + Hash + Clone,
sourcepub fn key1(&self) -> &K1
pub fn key1(&self) -> &K1
Gets a reference to the key #1 in the entry.
Examples
use double_map::DHashMap;
let mut map: DHashMap<&str, u32, i32> = DHashMap::new();
map.entry("poneyland", 0).unwrap().or_insert(12);
assert_eq!(map.entry("poneyland", 0).unwrap().key1(), &"poneyland");pub fn key2(&self) -> &K2
pub fn keys(&self) -> (&K1, &K2)
pub fn remove_entry(self) -> (K1, K2, V)
pub fn get(&self) -> &V
pub fn get_mut(&mut self) -> &mut V
pub fn into_mut(self) -> &'a mut V
pub fn insert(&mut self, value: V) -> V
pub fn remove(self) -> V
Trait Implementations
Auto Trait Implementations
impl<'a, K1, K2, V> RefUnwindSafe for OccupiedEntry<'a, K1, K2, V> where
K1: RefUnwindSafe,
K2: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K1, K2, V> Send for OccupiedEntry<'a, K1, K2, V> where
K1: Send,
K2: Send,
V: Send,
impl<'a, K1, K2, V> Sync for OccupiedEntry<'a, K1, K2, V> where
K1: Sync,
K2: Sync,
V: Sync,
impl<'a, K1, K2, V> Unpin for OccupiedEntry<'a, K1, K2, V> where
K1: Unpin,
K2: Unpin,
impl<'a, K1, K2, V> !UnwindSafe for OccupiedEntry<'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