pub fn insert<T: Send + Sync + 'static>(&mut self, item: T) -> Option<Arc<T>> {
        self.map
            .insert(TypeId::of::<T>(), Arc::new(item))
            .map(|arc| arc.downcast().expect("Values are stored by TypeId"))
    }
/// Inserts a value into the container.
///
/// If the container do not has this type present, `None` is returned.
/// Otherwise, the value is updated, and the old value is returned.
Inserts a value into the container.
If the container do not has this type present, `None` is returned.
Otherwise, the value is updated, and the old value is returned.
Inserts a value into the container . If the container do not has this type present ` None ` is returned . Otherwise the value is updated and the old value is returned .
pub fn insert<T: Send + Sync + 'static>(&mut self, item: T) -> Option<Arc<T>> {
        self.map
            .insert(TypeId::of::<T>(), Arc::new(item))
            .map(|arc| arc.downcast().expect("Values are stored by TypeId"))
    }
pub fn insert < T : Send + Sync + ' static > ( & mut self , item : T ) -> Option < Arc < T > > { self . map . insert ( TypeId :: of :: < T > ( ) , Arc :: new ( item ) ) . map ( | arc | arc . downcast ( ) . expect ( " " ) ) }
Inserts a value into the container.
Inserts a value into the container .
&mut self
item
T
&mut self
item
T