Expand description
Use when your key is just PartialEq, not Ord or Hash.
Fields
inner: Vec<(K, V)>
Implementations
sourceimpl<K: Clone + PartialEq, V> VecMap<K, V>
impl<K: Clone + PartialEq, V> VecMap<K, V>
pub fn new() -> VecMap<K, V>
pub fn consume(self) -> Vec<(K, V)>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn mut_or_insert<F: Fn() -> V>(&mut self, key: K, ctor: F) -> &mut V
pub fn get(&self, key: &K) -> Option<&V>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
Trait Implementations
Auto Trait Implementations
impl<K, V> RefUnwindSafe for VecMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for VecMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for VecMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> Unpin for VecMap<K, V> where
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for VecMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more