Struct abstutil::collections::FixedMap [−][src]
pub struct FixedMap<K: IndexableKey, V> {
inner: Vec<Option<V>>,
key_type: PhantomData<K>,
}
Expand description
A drop-in replacement for BTreeMap
, where the keys have the property of being array indices.
Some values may be missing. Much more efficient at operations on individual objects, because
it just becomes a simple array lookup.
Fields
inner: Vec<Option<V>>
key_type: PhantomData<K>
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<K, V> RefUnwindSafe for FixedMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for FixedMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more