Skip to main content

CommandHandler

Trait CommandHandler 

Source
pub trait CommandHandler<C: ShellConfig> {
    // Required method
    fn execute_sync(
        &self,
        id: &str,
        args: &[&str],
    ) -> Result<Response<C>, CliError>;
}
Expand description

Command execution handler trait. Maps command IDs to execution functions (dispatches on unique ID, not display name).

Required Methods§

Source

fn execute_sync(&self, id: &str, args: &[&str]) -> Result<Response<C>, CliError>

Execute synchronous command by unique ID.

Implementors§