pub type TypeIdMap<V> = IndexMap<TypeId, V, NoOpHash>;Expand description
A specialized map type with Key of TypeId
Iteration order only depends on the order of insertions and deletions.
Aliased Type§
pub struct TypeIdMap<V> { /* private fields */ }Trait Implementations§
Source§impl<V> TypeIdMapExt<V> for TypeIdMap<V>
impl<V> TypeIdMapExt<V> for TypeIdMap<V>
Source§fn insert_type<T: ?Sized + 'static>(&mut self, v: V) -> Option<V>
fn insert_type<T: ?Sized + 'static>(&mut self, v: V) -> Option<V>
Inserts a value for the type
T. Read moreSource§fn get_type<T: ?Sized + 'static>(&self) -> Option<&V>
fn get_type<T: ?Sized + 'static>(&self) -> Option<&V>
Returns a reference to the value for type
T, if one exists.Source§fn get_type_mut<T: ?Sized + 'static>(&mut self) -> Option<&mut V>
fn get_type_mut<T: ?Sized + 'static>(&mut self) -> Option<&mut V>
Returns a mutable reference to the value for type
T, if one exists.Source§fn remove_type<T: ?Sized + 'static>(&mut self) -> Option<V>
fn remove_type<T: ?Sized + 'static>(&mut self) -> Option<V>
Removes type
T from the map, returning the value for this
key if it was previously present.Source§fn entry_type<T: ?Sized + 'static>(&mut self) -> TypeIdMapEntry<'_, TypeId, V>
fn entry_type<T: ?Sized + 'static>(&mut self) -> TypeIdMapEntry<'_, TypeId, V>
Gets the type
T’s entry in the map for in-place manipulation.