pub struct OccupiedEntry<'a, T: BiHashItem, S = DefaultHashBuilder, A: Allocator = Global> { /* private fields */ }
Implementations§
Source§impl<'a, T: BiHashItem, S: Clone + BuildHasher, A: Allocator> OccupiedEntry<'a, T, S, A>
impl<'a, T: BiHashItem, S: Clone + BuildHasher, A: Allocator> OccupiedEntry<'a, T, S, A>
Sourcepub fn is_unique(&self) -> bool
pub fn is_unique(&self) -> bool
Returns true if the entry is unique.
Since BiHashMap
is keyed by two keys, it’s possible for
OccupiedEntry
to match up to two separate items. This function returns
true if the entry is unique, meaning all keys point to exactly one item.
Sourcepub fn is_non_unique(&self) -> bool
pub fn is_non_unique(&self) -> bool
Returns true if the OccupiedEntry
represents more than one item, or if
some keys are not present.
Sourcepub fn get(&self) -> OccupiedEntryRef<'_, T>
pub fn get(&self) -> OccupiedEntryRef<'_, T>
Returns references to values that match the provided keys.
If you need a reference to T
that may outlive the destruction of the
Entry
value, see into_ref
.
Sourcepub fn get_mut(&mut self) -> OccupiedEntryMut<'_, T, S>
pub fn get_mut(&mut self) -> OccupiedEntryMut<'_, T, S>
Returns mutable references to values that match the provided keys.
If you need a reference to T
that may outlive the destruction of the
Entry
value, see into_mut
.
Sourcepub fn into_ref(self) -> OccupiedEntryRef<'a, T>
pub fn into_ref(self) -> OccupiedEntryRef<'a, T>
Converts self into shared references to items that match the provided keys.
If you need multiple references to the OccupiedEntry
, see
get
.
Sourcepub fn into_mut(self) -> OccupiedEntryMut<'a, T, S>
pub fn into_mut(self) -> OccupiedEntryMut<'a, T, S>
Converts self into mutable references to items that match the provided keys.
If you need multiple references to the OccupiedEntry
, see
get_mut
.