Trait bevy::reflect::List[]

pub trait List: Reflect {
    pub fn get(&self, index: usize) -> Option<&(dyn Reflect + 'static)>;
pub fn get_mut(
        &mut self,
        index: usize
    ) -> Option<&mut (dyn Reflect + 'static)>;
pub fn push(&mut self, value: Box<dyn Reflect + 'static, Global>);
pub fn len(&self) -> usize;
pub fn iter(&self) -> ListIter<'_>

Notable traits for ListIter<'a>

impl<'a> Iterator for ListIter<'a> type Item = &'a (dyn Reflect + 'static);
; pub fn is_empty(&self) -> bool { ... }
pub fn clone_dynamic(&self) -> DynamicList { ... } }

An ordered, mutable list of Reflect items. This corresponds to types like std::vec::Vec.

Required methods

pub fn get(&self, index: usize) -> Option<&(dyn Reflect + 'static)>

pub fn get_mut(&mut self, index: usize) -> Option<&mut (dyn Reflect + 'static)>

pub fn push(&mut self, value: Box<dyn Reflect + 'static, Global>)

pub fn len(&self) -> usize

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

Notable traits for ListIter<'a>

impl<'a> Iterator for ListIter<'a> type Item = &'a (dyn Reflect + 'static);

Loading content...

Provided methods

pub fn is_empty(&self) -> bool

pub fn clone_dynamic(&self) -> DynamicList

Loading content...

Implementations on Foreign Types

impl<T> List for Vec<T, Global> where
    T: Reflect

impl<T> List for SmallVec<T> where
    T: 'static + Array + Send + Sync,
    <T as Array>::Item: Reflect,
    <T as Array>::Item: Clone

Loading content...

Implementors

impl List for DynamicList

Loading content...