pub struct PlainMap<Key: Copy, Value: Copy> { /* private fields */ }
Implementations§
Source§impl<Key: PartialEq + Copy, Value: Copy> PlainMap<Key, Value>
impl<Key: PartialEq + Copy, Value: Copy> PlainMap<Key, Value>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn reserve(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn insert(&mut self, k: Key, v: Value) -> Option<Value>
pub fn get(&self, k: &Key) -> Option<&Value>
pub fn get_mut(&mut self, k: &Key) -> Option<&mut Value>
pub fn get_key_value(&self, k: &Key) -> Option<&(Key, Value)>
pub fn get_key_value_mut(&mut self, k: &Key) -> Option<&mut (Key, Value)>
pub fn contains_key(&self, k: &Key) -> bool
pub fn remove(&mut self, k: &Key) -> Option<Value>
pub fn remove_entry(&mut self, k: &Key) -> Option<(Key, Value)>
pub fn entry(&mut self, k: Key) -> PlainMapEntry<'_, Key, Value>
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn iter(&self) -> Iter<'_, (Key, Value)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut (Key, Value)>
pub fn keys(&self) -> impl Iterator<Item = &Key>
pub fn keys_mut(&mut self) -> impl Iterator<Item = &mut Key>
pub fn values(&self) -> impl Iterator<Item = &Value>
pub fn values_mut(&mut self) -> impl Iterator<Item = &mut Value>
pub fn drain(&mut self) -> Drain<'_, (Key, Value)>
Trait Implementations§
Auto Trait Implementations§
impl<Key, Value> Freeze for PlainMap<Key, Value>
impl<Key, Value> RefUnwindSafe for PlainMap<Key, Value>where
Key: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Key, Value> Send for PlainMap<Key, Value>
impl<Key, Value> Sync for PlainMap<Key, Value>
impl<Key, Value> Unpin for PlainMap<Key, Value>
impl<Key, Value> UnwindSafe for PlainMap<Key, Value>
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