Struct sixtyfps_corelib::model::VecModel [−][src]
pub struct VecModel<T> { /* fields omitted */ }
Expand description
A model backed by a SharedVector
Implementations
Allocate a new model from a slice
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. This function should be called with row < row_count()
.
If the model cannot support data changes, then it is ok to do nothing (default implementation).
If the model can update the data, it should also call row_changed on its internal ModelNotify
. Read more
Should forward to the internal ModelNotify::attach
Return something that can be downcast’ed (typically self) Read more
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.