Struct flo_ui::DynamicViewModel
[−]
[src]
pub struct DynamicViewModel { /* fields omitted */ }
The dynamic viewmodel lets us define arbitrary properties as bound or computed values. A particular key can only be bound or computed: if it is set as both, the computed version 'wins'.
Methods
impl DynamicViewModel
[src]
pub fn new() -> DynamicViewModel
[src]
Creates a new dynamic viewmodel
pub fn set_computed<TFn>(&self, property_name: &str, calculate_value: TFn) where
TFn: 'static + Send + Sync + Fn() -> PropertyValue,
[src]
TFn: 'static + Send + Sync + Fn() -> PropertyValue,
Sets a binding to a computed value
Trait Implementations
impl ViewModel for DynamicViewModel
[src]
fn get_property(&self, property_name: &str) -> BindRef<PropertyValue>
[src]
Retrieves a property
fn set_property(&self, property_name: &str, new_value: PropertyValue)
[src]
Updates a property
fn get_property_names(&self) -> Vec<String>
[src]
Retrieves the names of all of the properties in this item