Trait zng_app::widget::ResponseVarSubscribe
source · pub trait ResponseVarSubscribe<T: VarValue> {
// Required methods
fn on_pre_rsp<H>(&self, handler: H) -> VarHandle
where H: AppHandler<OnVarArgs<T>>;
fn on_rsp<H>(&self, handler: H) -> VarHandle
where H: AppHandler<OnVarArgs<T>>;
}
Expand description
Extension methods to subscribe app handlers to a response variable.
Required Methods§
sourcefn on_pre_rsp<H>(&self, handler: H) -> VarHandlewhere
H: AppHandler<OnVarArgs<T>>,
fn on_pre_rsp<H>(&self, handler: H) -> VarHandlewhere
H: AppHandler<OnVarArgs<T>>,
Add a handler
that is called once when the response is received,
the handler is called before all other UI updates.
The handle is not called if already is_done
, in this case a dummy handle is returned.
Object Safety§
This trait is not object safe.