pub trait Bindable:
Any
+ Send
+ Sync {
// Required methods
fn bindings(&self) -> Vec<BindingConfig>;
fn set_bindings(&mut self, bindings: Vec<BindingConfig>);
fn apply_binding(&mut self, target: &str, value: &dyn Any) -> bool;
fn get_binding_value(&self, target: &str) -> Option<Box<dyn Any + Send>>;
}Expand description
Trait for types that can be bound to state.
Required Methods§
Sourcefn bindings(&self) -> Vec<BindingConfig>
fn bindings(&self) -> Vec<BindingConfig>
Get bindings for this widget.
Sourcefn set_bindings(&mut self, bindings: Vec<BindingConfig>)
fn set_bindings(&mut self, bindings: Vec<BindingConfig>)
Set bindings for this widget.
Sourcefn apply_binding(&mut self, target: &str, value: &dyn Any) -> bool
fn apply_binding(&mut self, target: &str, value: &dyn Any) -> bool
Apply a binding value update.