Trait IAction

pub trait IAction: AsAny {
    // Provided methods
    fn on_attach(&self) -> Result<(), Error> { ... }
    fn on_detach(&self) -> Result<(), Error> { ... }
    fn on_invoke(&self) -> Result<(), Error> { ... }
    fn on_prepare_delayed_invoke(&self) -> Result<(), Error> { ... }
    fn on_delayed_invoke(&self) -> Result<(), Error> { ... }
    fn on_unprepare_delayed_invoke(&self) -> Result<(), Error> { ... }
}

Provided Methods§

fn on_attach(&self) -> Result<(), Error>

Overridable method called during attach.

fn on_detach(&self) -> Result<(), Error>

Overridable method called during detach.

fn on_invoke(&self) -> Result<(), Error>

Callback called by Kanzi when the action is invoked by its trigger without delay. Use this to execute an action without delay.

fn on_prepare_delayed_invoke(&self) -> Result<(), Error>

Callback called by Kanzi when the action is invoked by its trigger with delay. Use this to prepare for delayed execution.

fn on_delayed_invoke(&self) -> Result<(), Error>

Callback called by Kanzi when the action is invoked by trigger with delay, after the delay duration expires. Use this to execute an action with delay.

fn on_unprepare_delayed_invoke(&self) -> Result<(), Error>

Kanzi calls this callback when an action is invoked by trigger with delay, after on_delayed_invoke callback, or when it cancels a delayed execution.

An example of cancellation of delayed execution is when you detach the action before the execution is done. Use this function to roll back any preparations made for a delayed execution.

Implementors§