ActionHandler

Trait ActionHandler 

Source
pub trait ActionHandler {
    // Required methods
    fn handle_action(
        &self,
        action: &Action,
        context: &ActionContext,
        tui: &mut dyn ActionHandlerContext,
    ) -> Option<Result<ActionResult>>;
    fn name(&self) -> &'static str;
}
Expand description

Trait for handling groups of related actions

Required Methods§

Source

fn handle_action( &self, action: &Action, context: &ActionContext, tui: &mut dyn ActionHandlerContext, ) -> Option<Result<ActionResult>>

Handle an action if this handler is responsible for it

Source

fn name(&self) -> &'static str

Get the name of this handler (for debugging/logging)

Implementors§