Trait bevy_reflect::Map[][src]

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

Notable traits for MapIter<'a>

impl<'a> Iterator for MapIter<'a> type Item = (&'a dyn Reflect, &'a dyn Reflect);
;
fn clone_dynamic(&self) -> DynamicMap; 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

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

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

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

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

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

Notable traits for MapIter<'a>

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

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

Loading content...

Provided methods

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...