[][src]Trait bevy_reflect::Map

pub trait Map: Reflect {
    pub fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect>;
pub fn get_mut(&mut self, key: &dyn Reflect) -> Option<&mut dyn Reflect>;
pub fn get_at(&self, index: usize) -> Option<(&dyn Reflect, &dyn Reflect)>;
pub fn len(&self) -> usize;
pub fn iter(&self) -> MapIter<'_>

Notable traits for MapIter<'a>

impl<'a> Iterator for MapIter<'a> type Item = (&'a dyn Reflect, &'a dyn Reflect);
;
pub fn clone_dynamic(&self) -> DynamicMap; pub fn is_empty(&self) -> bool { ... } }

An ordered ReflectValue->ReflectValue mapping. ReflectValue Keys are assumed to return a non-None hash.
Ideally the ordering is stable across runs, but this is not required. This corresponds to types like std::collections::HashMap.

Required methods

pub fn get(&self, key: &dyn Reflect) -> Option<&dyn Reflect>[src]

pub fn get_mut(&mut self, key: &dyn Reflect) -> Option<&mut dyn Reflect>[src]

pub fn get_at(&self, index: usize) -> Option<(&dyn Reflect, &dyn Reflect)>[src]

pub fn len(&self) -> usize[src]

pub fn iter(&self) -> MapIter<'_>

Notable traits for MapIter<'a>

impl<'a> Iterator for MapIter<'a> type Item = (&'a dyn Reflect, &'a dyn Reflect);
[src]

pub fn clone_dynamic(&self) -> DynamicMap[src]

Loading content...

Provided methods

pub fn is_empty(&self) -> bool[src]

Loading content...

Implementations on Foreign Types

impl<K: Reflect + Clone + Eq + Hash, V: Reflect + Clone> Map for HashMap<K, V>[src]

Loading content...

Implementors

impl Map for DynamicMap[src]

Loading content...