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§

source

fn on_pre_rsp<H>(&self, handler: H) -> VarHandle
where 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.

source

fn on_rsp<H>(&self, handler: H) -> VarHandle
where H: AppHandler<OnVarArgs<T>>,

Add a handler that is called once when the response is received, the handler is called after 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.

Implementations on Foreign Types§

source§

impl<T: VarValue> ResponseVarSubscribe<T> for ResponseVar<T>

source§

fn on_pre_rsp<H>(&self, handler: H) -> VarHandle
where H: AppHandler<OnVarArgs<T>>,

source§

fn on_rsp<H>(&self, handler: H) -> VarHandle
where H: AppHandler<OnVarArgs<T>>,

Implementors§