Bindable

Trait Bindable 

Source
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§

Source

fn bindings(&self) -> Vec<BindingConfig>

Get bindings for this widget.

Source

fn set_bindings(&mut self, bindings: Vec<BindingConfig>)

Set bindings for this widget.

Source

fn apply_binding(&mut self, target: &str, value: &dyn Any) -> bool

Apply a binding value update.

Source

fn get_binding_value(&self, target: &str) -> Option<Box<dyn Any + Send>>

Get the current value for a binding target.

Implementors§