[−][src]Trait flo_binding::Changeable
Trait implemented by items that can notify something when they're changed
Required methods
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn 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
[src]
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
[src]
impl<Value> Changeable for BindRef<Value>
[src]
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
[src]
impl<Value: 'static + Clone + PartialEq + Send> Changeable for Binding<Value>
[src]
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
[src]
impl<Value: 'static + Clone, TFn> Changeable for ComputedBinding<Value, TFn> where
TFn: 'static + Send + Sync + Fn() -> Value,
[src]
TFn: 'static + Send + Sync + Fn() -> Value,
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
[src]
impl<Value: 'static + Send> Changeable for StreamBinding<Value>
[src]
fn when_changed(&self, what: Arc<dyn Notifiable>) -> Box<dyn Releasable>
[src]
Supplies a function to be notified when this item is changed