slint

Trait ModelTracker

pub trait ModelTracker {
    // Required methods
    fn attach_peer(&self, peer: ModelPeer<'_>);
    fn track_row_count_changes(&self);
    fn track_row_data_changes(&self, row: usize);
}
Expand description

This trait defines the interface that users of a model can use to track changes to a model. It is supplied via Model::model_tracker and implementation usually return a reference to its field of ModelNotify.

Required Methods§

fn attach_peer(&self, peer: ModelPeer<'_>)

Attach one peer. The peer will be notified when the model changes

fn track_row_count_changes(&self)

Register the model as a dependency to the current binding being evaluated, so that it will be notified when the model changes its size.

fn track_row_data_changes(&self, row: usize)

Register a row as a dependency to the current binding being evaluated, so that it will be notified when the value of that row changes.

Implementations on Foreign Types§

§

impl ModelTracker for ()

§

fn attach_peer(&self, _peer: ModelPeer<'_>)

§

fn track_row_count_changes(&self)

§

fn track_row_data_changes(&self, _row: usize)

Implementors§