pub struct TypeMap { /* private fields */ }
Implementations
sourceimpl TypeMap
impl TypeMap
pub fn insert<T: Send + Sync + 'static>(&mut self, t: T)
pub fn get<T: 'static>(&self) -> Option<&T>
pub fn contains<T: 'static>(&self) -> bool
pub fn remove<T: 'static>(&mut self) -> Option<T>
pub fn clear(&mut self)
pub fn extend(&mut self, other: TypeMap)
pub fn iter(&self) -> Iter<'_, TypeId, Box<dyn Any + Send + Sync>>
pub fn entry<T: 'static>(&mut self) -> Entry<'_, TypeId, T>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TypeMap
impl Send for TypeMap
impl Sync for TypeMap
impl Unpin for TypeMap
impl !UnwindSafe for TypeMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more