Trait bevy_internal::reflect::List
source · [−]pub trait List: Reflect {
fn get(&self, index: usize) -> Option<&(dyn Reflect + 'static)>;
fn get_mut(&mut self, index: usize) -> Option<&mut (dyn Reflect + 'static)>;
fn push(&mut self, value: Box<dyn Reflect + 'static, Global>);
fn len(&self) -> usize;
fn iter(&self) -> ListIter<'_>ⓘNotable traits for ListIter<'a>impl<'a> Iterator for ListIter<'a> type Item = &'a (dyn Reflect + 'static);
;
fn is_empty(&self) -> bool { ... }
fn clone_dynamic(&self) -> DynamicList { ... }
}
Expand description
An ordered, mutable list of Reflect items. This corresponds to types like std::vec::Vec
.
Required Methods
Returns a reference to the element at index
, or None
if out of bounds.
Returns a mutable reference to the element at index
, or None
if out of bounds.
Provided Methods
fn clone_dynamic(&self) -> DynamicList
fn clone_dynamic(&self) -> DynamicList
Clones the list, producing a DynamicList
.