Struct sixtyfps_corelib::model::VecModel
source · [−]pub struct VecModel<T> { /* private fields */ }
Expand description
A model backed by a Vec<T>
Implementations
Allocate a new model from a slice
Inserts a row at position index. All rows after that are shifted. This function panics if index is > row_count().
Trait Implementations
type Data = T
type Data = T
The model data: A model is a set of row and each row has this data
Returns the data for a particular row. This function should be called with row < row_count()
.
Sets the data for a particular row. Read more
The implementation should return a reference to its ModelNotify
field.
Return something that can be downcast’ed (typically self) Read more
👎 Deprecated:
Re-implement model_tracker instead of this function
The implementation should forward to ModelNotify::attach
fn iter(&self) -> ModelIterator<'_, Self::Data>ⓘNotable traits for ModelIterator<'a, T>impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
where
Self: Sized,
fn iter(&self) -> ModelIterator<'_, Self::Data>ⓘNotable traits for ModelIterator<'a, T>impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
where
Self: Sized,
Notable traits for ModelIterator<'a, T>
impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
Returns an iterator visiting all elements of the model.