Trait bevy_reflect::List

source ·
pub trait List: Reflect + Array {
    fn push(&mut self, value: Box<dyn Reflect>);
    fn pop(&mut self) -> Option<Box<dyn Reflect>>;

    fn clone_dynamic(&self) -> DynamicList { ... }
}
Expand description

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

This is a sub-trait of Array as it implements a push function, allowing it’s internal size to grow.

Required Methods§

Appends an element to the list.

Removes the last element from the list (highest index in the array) and returns it, or None if it is empty.

Provided Methods§

Clones the list, producing a DynamicList.

Implementations on Foreign Types§

Implementors§