pub struct TinyDetMap<K: Ord, V> { /* private fields */ }Implementations§
Source§impl<K: Ord, V> TinyDetMap<K, V>
impl<K: Ord, V> TinyDetMap<K, V>
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn insert(&mut self, key: K, value: V) -> Option<V>
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Insert or update. Returns the previous value if the key existed.
pub fn get(&self, key: &K) -> Option<&V>
pub fn contains_key(&self, key: &K) -> bool
pub fn remove(&mut self, key: &K) -> Option<V>
Trait Implementations§
Source§impl<K: Clone + Ord, V: Clone> Clone for TinyDetMap<K, V>
impl<K: Clone + Ord, V: Clone> Clone for TinyDetMap<K, V>
Source§fn clone(&self) -> TinyDetMap<K, V>
fn clone(&self) -> TinyDetMap<K, V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K: Ord, V> Default for TinyDetMap<K, V>
impl<K: Ord, V> Default for TinyDetMap<K, V>
Source§impl<K: Ord + Clone, V: Clone> FromIterator<(K, V)> for TinyDetMap<K, V>
impl<K: Ord + Clone, V: Clone> FromIterator<(K, V)> for TinyDetMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for TinyDetMap<K, V>
impl<K, V> RefUnwindSafe for TinyDetMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for TinyDetMap<K, V>
impl<K, V> Sync for TinyDetMap<K, V>
impl<K, V> Unpin for TinyDetMap<K, V>
impl<K, V> UnsafeUnpin for TinyDetMap<K, V>
impl<K, V> UnwindSafe for TinyDetMap<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§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 more