AnyVarSubscribe

Trait AnyVarSubscribe 

Source
pub trait AnyVarSubscribe {
    // Required method
    fn subscribe(&self, op: UpdateOp, widget_id: WidgetId) -> VarHandle;
}
Expand description

Extension method to subscribe any widget to a variable.

Also see WIDGET methods for the primary way to subscribe from inside a widget.

Required Methods§

Source

fn subscribe(&self, op: UpdateOp, widget_id: WidgetId) -> VarHandle

Register the widget to receive an UpdateOp when this variable is new.

Variables without the NEW capability return VarHandle::dummy.

Implementations on Foreign Types§

Source§

impl AnyVarSubscribe for AnyVar

Source§

fn subscribe(&self, op: UpdateOp, widget_id: WidgetId) -> VarHandle

Source§

impl<T: VarValue> AnyVarSubscribe for Var<T>

Source§

fn subscribe(&self, op: UpdateOp, widget_id: WidgetId) -> VarHandle

Implementors§