Trait sokoban::node_allocator::NodeAllocatorMap
source · pub trait NodeAllocatorMap<K, V> {
// Required methods
fn insert(&mut self, key: K, value: V) -> Option<u32>;
fn remove(&mut self, key: &K) -> Option<V>;
fn contains(&self, key: &K) -> bool;
fn get(&self, key: &K) -> Option<&V>;
fn get_mut(&mut self, key: &K) -> Option<&mut V>;
fn size(&self) -> usize;
fn len(&self) -> usize;
fn capacity(&self) -> usize;
fn iter(&self) -> Box<dyn DoubleEndedIterator<Item = (&K, &V)> + '_>;
fn iter_mut(
&mut self
) -> Box<dyn DoubleEndedIterator<Item = (&K, &mut V)> + '_>;
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
This trait provides an API for map-like data structures that use the NodeAllocator struct as the underlying container