TypeIdMap

Type Alias TypeIdMap 

Source
pub type TypeIdMap<V> = HashMap<TypeId, V, NoOpHash>;
Expand description

A specialized hashmap 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>

Source§

fn insert_type<T: ?Sized + 'static>(&mut self, v: V) -> Option<V>

Inserts a value for the type T. Read more
Source§

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>

Returns a mutable reference to the value for type T, if one exists.
Source§

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) -> Entry<'_, TypeId, V, NoOpHash>

Gets the type T’s entry in the map for in-place manipulation.