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.

Appends an element to the list.

Returns the number of elements in the list.

Returns an iterator over the list.

Provided Methods

Returns true if the list contains no elements.

Clones the list, producing a DynamicList.

Implementations on Foreign Types

Implementors