pub struct TypeMap { /* private fields */ }Expand description
Nearly 1-to-1 with this blog:
https://nickbryan.co.uk/software/using-a-type-map-for-dependency-injection-in-rust/
A TypeMap uniquely stores an arbitrary value by its type. No types
can store more than one value.
Implementations§
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