[−][src]Trait sixtyfps::Model
A Model is providing Data for the Repeater or ListView elements of the .60
language
Associated Types
Loading content...Required methods
pub fn row_count(&self) -> usize
[src]
The amount of row in the model
pub fn row_data(&self, row: usize) -> Self::Data
[src]
Returns the data for a particular row. This function should be called with row < row_count()
.
pub fn attach_peer(&self, peer: ModelPeer)
[src]
Should forward to the internal ModelNotify::attach
Provided methods
pub fn set_row_data(&self, _row: usize, _data: Self::Data)
[src]
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
.
pub fn iter(&'a self) -> ModelIterator<'a, Self::Data>ⓘNotable traits for ModelIterator<'a, T>
impl<'a, T> Iterator for ModelIterator<'a, T> type Item = T;
[src]
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.
Implementations on Foreign Types
impl Model for usize
[src]
type Data = i32
pub fn row_count(&self) -> usize
[src]
pub fn row_data(&self, row: usize) -> <usize as Model>::Data
[src]
pub fn attach_peer(&self, _peer: ModelPeer)
[src]
impl Model for bool
[src]
type Data = ()
pub fn row_count(&self) -> usize
[src]
pub fn row_data(&self, _row: usize) -> <bool as Model>::Data
[src]
pub fn attach_peer(&self, _peer: ModelPeer)
[src]
Implementors
impl<T> Model for ModelHandle<T>
[src]
type Data = T
pub fn row_count(&self) -> usize
[src]
pub fn row_data(&self, row: usize) -> <ModelHandle<T> as Model>::Data
[src]
pub fn attach_peer(&self, peer: ModelPeer)
[src]
impl<T> Model for VecModel<T> where
T: Clone,
[src]
T: Clone,