Map

Trait Map 

Source
pub trait Map: Sized {
    type Inner;

    // Required methods
    fn into_inner(self) -> Self::Inner;
    fn get<T: 'static>(&self) -> Option<&T>;
    fn get_mut<T: 'static>(&mut self) -> Option<&mut T>;
    fn insert<T: 'static>(self, value: T) -> InsertedMap<Self, T>;
    fn remove<T: 'static>(self) -> Removed<Self, T>;
    fn len(&self) -> usize;
    fn type_id(&self, depth: usize) -> TypeId;
    fn type_id_iter<'a>(&'a self) -> MapTypeIdIterator<'a, Self> ;

    // Provided methods
    fn clear(self) -> StackedMap { ... }
    fn contains<T: 'static>(&self) -> bool { ... }
    fn is_empty(&self) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn into_inner(self) -> Self::Inner

Source

fn get<T: 'static>(&self) -> Option<&T>

Source

fn get_mut<T: 'static>(&mut self) -> Option<&mut T>

Source

fn insert<T: 'static>(self, value: T) -> InsertedMap<Self, T>

Source

fn remove<T: 'static>(self) -> Removed<Self, T>

Source

fn len(&self) -> usize

Source

fn type_id(&self, depth: usize) -> TypeId

Source

fn type_id_iter<'a>(&'a self) -> MapTypeIdIterator<'a, Self>

Provided Methods§

Source

fn clear(self) -> StackedMap

Source

fn contains<T: 'static>(&self) -> bool

Source

fn is_empty(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Map for StackedMap

Source§

impl<M: Map, U: 'static> Map for InsertedMap<M, U>

Source§

type Inner = M

Source§

impl<M: Map, U: 'static> Map for Removed<M, U>

Source§

type Inner = M