pub trait ModelExt: Model {
    fn row_data_tracked(&self, row: usize) -> Option<Self::Data> { ... }
    fn map<F, U>(self, map_function: F) -> MapModel<Self, F>
        Self: 'static,
        F: 'static + Fn(Self::Data) -> U
, { ... } fn filter<F>(self, filter_function: F) -> FilterModel<Self, F>
        Self: 'static,
        F: 'static + Fn(&Self::Data) -> bool
, { ... } }
Expand description

Extension trait with extra methods implemented on types that implement Model

Provided Methods

Convenience function that calls ModelTracker::track_row_data_changes before returning Model::row_data.

Calling row_data(row) does not register the row as a dependency when calling it while evaluating a property binding. This function calls track_row_data_changes(row) on the self.model_tracker() to enable tracking.

Returns a new Model where all elements are mapped by the function map_function. This is a shortcut for MapModel::new().

Returns a new Model where the elements are filtered by the function filter_function. This is a shortcut for FilterModel::new().