pub struct AverMap<K, V> { /* private fields */ }Implementations§
Source§impl<K, V> AverMap<K, V>
impl<K, V> AverMap<K, V>
pub fn new() -> Self
pub fn get(&self, key: &K) -> Option<&V>
pub fn contains_key(&self, key: &K) -> bool
Sourcepub fn insert_owned(self, key: K, value: V) -> Self
pub fn insert_owned(self, key: K, value: V) -> Self
O(1) amortized if unique owner, O(n) clone if shared.
Sourcepub fn remove_owned(self, key: &K) -> Self
pub fn remove_owned(self, key: &K) -> Self
O(1) amortized if unique owner, O(n) clone if shared.
pub fn keys(&self) -> impl Iterator<Item = &K>
pub fn values(&self) -> impl Iterator<Item = &V>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&K, &V)>
Trait Implementations§
Source§impl<K: AverDisplay + Clone + Eq + Hash + Ord, V: AverDisplay + Clone> AverDisplay for AverMap<K, V>
impl<K: AverDisplay + Clone + Eq + Hash + Ord, V: AverDisplay + Clone> AverDisplay for AverMap<K, V>
fn aver_display(&self) -> String
fn aver_display_inner(&self) -> String
impl<K: Eq + Hash + Clone, V: Eq + Clone> Eq for AverMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for AverMap<K, V>
impl<K, V> RefUnwindSafe for AverMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> !Send for AverMap<K, V>
impl<K, V> !Sync for AverMap<K, V>
impl<K, V> Unpin for AverMap<K, V>
impl<K, V> UnsafeUnpin for AverMap<K, V>
impl<K, V> UnwindSafe for AverMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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