Struct network_collections::BoundedHashMap [−][src]
A bounded hash map, very similar to a regular Rust HashMap but can not become larger than its maximum capacity (plus one); ideal for indexes of network connections, etc in resource constraint aware environments.
Methods
impl<K: Hash + Eq, V> BoundedHashMap<K, V>
[src]
impl<K: Hash + Eq, V> BoundedHashMap<K, V>
pub fn new(maximum_capacity: usize) -> Self
[src]
pub fn new(maximum_capacity: usize) -> Self
Creates a new instance.
pub fn contains_key(&self, key: &K) -> bool
[src]
pub fn contains_key(&self, key: &K) -> bool
Identical to HashMap.
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
[src]
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
Identical to HashMap.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Identical to HashMap.
pub fn is_full(&self) -> bool
[src]
pub fn is_full(&self) -> bool
Is this map full?
pub fn is_over_filled(&self) -> bool
[src]
pub fn is_over_filled(&self) -> bool
Is this map over-full? False if just full.
ⓘImportant traits for &'a mut Rpub fn insert_uniquely_and_return_mutable_reference(
&mut self,
key: K,
value: V
) -> &mut V
[src]
ⓘImportant traits for &'a mut R
pub fn insert_uniquely_and_return_mutable_reference(
&mut self,
key: K,
value: V
) -> &mut V
Inserts a value once, returning a mutable reference to it.
pub fn insert(&mut self, key: K, value: V) -> Option<V>
[src]
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Identical to HashMap.
pub fn remove(&mut self, key: &K) -> Option<V>
[src]
pub fn remove(&mut self, key: &K) -> Option<V>
Identical to HashMap.
pub fn remove_entry(&mut self, key: &K) -> Option<(K, V)>
[src]
pub fn remove_entry(&mut self, key: &K) -> Option<(K, V)>
Identical to HashMap.
Trait Implementations
Auto Trait Implementations
impl<K, V> Send for BoundedHashMap<K, V> where
K: Send,
V: Send,
impl<K, V> Send for BoundedHashMap<K, V> where
K: Send,
V: Send,
impl<K, V> Sync for BoundedHashMap<K, V> where
K: Sync,
V: Sync,
impl<K, V> Sync for BoundedHashMap<K, V> where
K: Sync,
V: Sync,