pub fn insert<T: Resource>(&mut self, resource: T) -> Option<T> {
        self.resources
            .insert(TypeId::of::<T>(), RwLock::new(Box::new(resource)))
            .map(|resource| downcast_resource(resource.into_inner()))
    }
/// Inserts the given resource of type `T` into the container.
///
/// If a resource of this type was already present,
/// it will be updated, and the original returned.
Inserts the given resource of type `T` into the container.
If a resource of this type was already present,
it will be updated, and the original returned.
Inserts the given resource of type ` T ` into the container . If a resource of this type was already present it will be updated and the original returned .
pub fn insert<T: Resource>(&mut self, resource: T) -> Option<T> {
        self.resources
            .insert(TypeId::of::<T>(), RwLock::new(Box::new(resource)))
            .map(|resource| downcast_resource(resource.into_inner()))
    }
pub fn insert < T : Resource > ( & mut self , resource : T ) -> Option < T > { self . resources . insert ( TypeId :: of :: < T > ( ) , RwLock :: new ( Box :: new ( resource ) ) ) . map ( | resource | downcast_resource ( resource . into_inner ( ) ) ) }
Inserts the given resource of type `T` into the container.
Inserts the given resource of type ` T ` into the container .
&mut self
resource
T
&mut self
resource
T