pub type LinearMap<K, V, const N: usize> = LinearMapInner<K, V, OwnedStorage<K, V, N>>;
A fixed capacity map/dictionary that performs lookups via linear search.
Note that as this map doesn’t use hashing so most operations are O(n) instead of O(1).
pub struct LinearMap<K, V, const N: usize> { /* private fields */ }
Creates an empty LinearMap.
LinearMap
use heapless::LinearMap; // allocate the map on the stack let mut map: LinearMap<&str, isize, 8> = LinearMap::new(); // allocate the map in a static variable static mut MAP: LinearMap<&str, isize, 8> = LinearMap::new();
source