Skip to main content

HashMapModuleExtension

Trait HashMapModuleExtension 

Source
pub trait HashMapModuleExtension<T, M> {
    // Required method
    fn insert_typeid(&mut self, value: M)
       where M: ModuleT<Context = T> + 'static,
             T: App;
}
Expand description

Extension trait for inserting a module into a map keyed by its TypeId.

Required Methods§

Source

fn insert_typeid(&mut self, value: M)
where M: ModuleT<Context = T> + 'static, T: App,

Inserts the module into the map, using the module type’s TypeId as the key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, M> HashMapModuleExtension<T, M> for AHashMap<TypeId, Module<T>>
where M: ModuleT<Context = T> + 'static, T: App,