logo

Trait bevy::reflect::Map[]

pub trait Map: Reflect {
    fn get(
        &self,
        key: &(dyn Reflect + 'static)
    ) -> Option<&(dyn Reflect + 'static)>;
fn get_mut(
        &mut self,
        key: &(dyn Reflect + 'static)
    ) -> Option<&mut (dyn Reflect + 'static)>;
fn get_at(
        &self,
        index: usize
    ) -> Option<(&(dyn Reflect + 'static), &(dyn Reflect + 'static))>;
fn len(&self) -> usize;
fn iter(&self) -> MapIter<'_>
Notable traits for MapIter<'a>
impl<'a> Iterator for MapIter<'a> type Item = (&'a (dyn Reflect + 'static), &'a (dyn Reflect + 'static));
;
fn clone_dynamic(&self) -> DynamicMap; fn is_empty(&self) -> bool { ... } }
Expand description

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

Provided methods

Implementations on Foreign Types

Implementors