#[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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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