Trait flo_binding::Changeable [−][src]
pub trait Changeable { fn when_changed(&self, what: Arc<Notifiable>) -> Box<Releasable>; }
Trait implemented by items that can notify something when they're changed
Required Methods
fn when_changed(&self, what: Arc<Notifiable>) -> Box<Releasable>
Supplies a function to be notified when this item is changed
This event is only fired after the value has been read since the most recent change. Note that this means if the value is never read, this event may never fire. This behaviour is desirable when deferring updates as it prevents large cascades of 'changed' events occurring for complicated dependency trees.
The releasable that's returned has keep_alive turned off by default, so be sure to store it in a variable or call keep_alive() to keep it around (if the event never seems to fire, this is likely to be the problem)
Implementors
impl Changeable for BindingDependencies
impl<Value: 'static + Clone + PartialEq + Send> Changeable for Binding<Value>
impl<Value: 'static + Clone, TFn> Changeable for ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,impl<Value> Changeable for BindRef<Value>
impl<Value: 'static + Send> Changeable for StreamBinding<Value>