Struct egui::any::TypeMap  [−][src]
pub struct TypeMap(_);Expand description
Maps types to a single instance of that type.
Used to store state per widget type. In effect a sort of singleton storage.
Similar to the typemap crate.
Implementations
pub fn get_or_insert_with<T: AnyMapTrait>(
    &mut self, 
    or_insert_with: impl FnOnce() -> T
) -> &T
pub fn get_mut_or_insert_with<T: AnyMapTrait>(
    &mut self, 
    or_insert_with: impl FnOnce() -> T
) -> &mut T
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TypeMap
impl !UnwindSafe for TypeMap
Blanket Implementations
Mutably borrows from an owned value. Read more
