pub struct TypeMap { /* private fields */ }
Implementations§
source§impl TypeMap
impl TypeMap
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn insert<T: Send + Sync + 'static>(&mut self, t: T)
pub fn get<T: 'static>(&self) -> Option<&T>
pub fn get_mut<T: 'static>(&mut self) -> Option<&mut 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>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more