zng_app::widget

Trait AnyVarSubscribe

source
pub trait AnyVarSubscribe: AnyVar {
    // 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.

Implementors§