Skip to main content

model

Function model 

Source
pub fn model(initial: i64) -> Model
Expand description

A new observable model, with one Int property holding initial.

That property is what Model::get and Model::set mean; anything else the model should hold is Model::property, named and of whatever type — or crate::observable!, which declares them all at once.