pub(super) struct Map<K, V> {
inner: MapInner<K, V>,
}
Fields§
§inner: MapInner<K, V>
Implementations§
source§impl<K, V> Map<K, V>
impl<K, V> Map<K, V>
pub(super) fn is_empty(&self) -> bool
pub(super) fn len(&self) -> usize
pub(super) fn get( &self, key: &K, key_from_value: impl FnOnce(&V) -> K, ) -> Option<&V>
pub(super) fn entry( &mut self, key: K, key_from_value: impl FnOnce(&V) -> K, ) -> Entry<'_, K, V>
pub(super) fn remove( &mut self, key: &K, key_from_value: impl FnOnce(&V) -> K, ) -> Option<V>
Trait Implementations§
source§impl<'a, K, V> IntoIterator for &'a Map<K, V>
impl<'a, K, V> IntoIterator for &'a Map<K, V>
source§impl<K, V> MallocShallowSizeOf for Map<K, V>
impl<K, V> MallocShallowSizeOf for Map<K, V>
source§fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn shallow_size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of immediate heap-allocated descendant
structures, but not the space taken up by the value itself. Anything
beyond the immediate descendants must be measured separately, using
iteration.
Auto Trait Implementations§
impl<K, V> Freeze for Map<K, V>where
V: Freeze,
impl<K, V> RefUnwindSafe for Map<K, V>where
V: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, V> Send for Map<K, V>
impl<K, V> Sync for Map<K, V>
impl<K, V> Unpin for Map<K, V>where
V: Unpin,
impl<K, V> UnwindSafe for Map<K, V>where
V: UnwindSafe,
K: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert