macro_rules! ferro_model {
($ty:ty, $describe:expr) => { ... };
}Expand description
Declares a model type: gives it identity equality (so shared instances can travel through bindings and be stored in properties) and its binding metadata.
ⓘ
ferro_model!(PersonVm, |b| b
.notify_property_changed()
.property::<Value<String>>("Name", |vm| vm.name(), |vm, v| vm.set_name(v))
.read_only::<Value<i32>>("Age", |vm| vm.age())
.method("Save", |vm, _| vm.save()));