pub struct TypeMap { /* private fields */ }
Implementations§
Source§impl TypeMap
impl TypeMap
pub fn new() -> Self
pub fn contains_key<Key: Type>(&self) -> bool
pub fn insert_raw<Value: Type>(&mut self, key_type: TypeId, val: Value)
pub fn insert<Key: Type, Value: Type>(&mut self, val: Value)
pub fn get_raw<'value, Val: Type>( &'value self, key: TypeId, ) -> TypeQueryResult<&Val>
pub fn get<'a, Key: Type, Val: Type>(&'a self) -> TypeQueryResult<&Val>
pub fn get_mut_raw<'value, Val: Type>( &'value mut self, key: TypeId, ) -> TypeQueryResult<&mut Val>
pub fn get_mut<'a, Key: Type, Val: Type>( &'a mut self, ) -> TypeQueryResult<&mut Val>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeMap
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