Trait Handler

Source
pub trait Handler:
    Sized
    + Clone
    + Send
    + 'static {
    // Provided methods
    fn run(self) -> Result<()> { ... }
    fn execute(&mut self, ctx: Context) -> Result<()> { ... }
    fn handle_command(&mut self, _: &mut Context) -> Result<()> { ... }
    fn handle_subcommand(&mut self, _: Context) -> Result<()> { ... }
}

Provided Methods§

Source

fn run(self) -> Result<()>

Source

fn execute(&mut self, ctx: Context) -> Result<()>

Source

fn handle_command(&mut self, _: &mut Context) -> Result<()>

Source

fn handle_subcommand(&mut self, _: Context) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§