Struct mz_ore::collections::HashMap
source · #[repr(transparent)]pub struct HashMap<K, V>(HashMap<K, V>);
Expand description
A wrapper around std::collections::HashMap
that hides methods that expose unstable
iteration order.
See the module documentation for a rationale.
Tuple Fields§
§0: HashMap<K, V>
Implementations§
source§impl<K, V> HashMap<K, V>
impl<K, V> HashMap<K, V>
source§impl<K, V> HashMap<K, V>
impl<K, V> HashMap<K, V>
sourcepub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
sourcepub fn contains_key<Q>(&self, k: &Q) -> bool
pub fn contains_key<Q>(&self, k: &Q) -> bool
sourcepub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
Trait Implementations§
source§impl<K, V> AssociativeExt<K, V> for HashMap<K, V>
impl<K, V> AssociativeExt<K, V> for HashMap<K, V>
source§fn expect_insert(&mut self, k: K, v: V, msg: &str)
fn expect_insert(&mut self, k: K, v: V, msg: &str)
Inserts a key and value, panicking with
a given message if a true
insert (as opposed to an update) cannot be done
because the key already existed in the collection.
source§fn expect_remove(&mut self, k: &K, msg: &str) -> V
fn expect_remove(&mut self, k: &K, msg: &str) -> V
Removes a key, panicking with
a given message if a true
removal (as opposed to a no-op) cannot be done
because the key does not exist in the collection.
source§fn unwrap_insert(&mut self, k: K, v: V)
fn unwrap_insert(&mut self, k: K, v: V)
Inserts a key and value, panicking if a true
insert (as opposed to an update) cannot be done
because the key already existed in the collection.
source§fn unwrap_remove(&mut self, k: &K) -> V
fn unwrap_remove(&mut self, k: &K) -> V
Removes a key, panicking if a true
removal (as opposed to a no-op) cannot be done
because the key does not exist in the collection.
source§impl<'a, K, V> Extend<(&'a K, &'a V)> for HashMap<K, V>
impl<'a, K, V> Extend<(&'a K, &'a V)> for HashMap<K, V>
source§fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (&'a K, &'a V)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<K, V> Extend<(K, V)> for HashMap<K, V>
impl<K, V> Extend<(K, V)> for HashMap<K, V>
source§fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (K, V)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<K, V> FromIterator<(K, V)> for HashMap<K, V>
impl<K, V> FromIterator<(K, V)> for HashMap<K, V>
impl<K, V> Eq for HashMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for HashMap<K, V>
impl<K, V> RefUnwindSafe for HashMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for HashMap<K, V>
impl<K, V> Sync for HashMap<K, V>
impl<K, V> Unpin for HashMap<K, V>
impl<K, V> UnwindSafe for HashMap<K, V>where
K: UnwindSafe,
V: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request