pub trait CommandHandler:
Send
+ Sync
+ 'static {
// Required method
fn execute(&mut self, app: &mut TerminalApp, args: &[&str]) -> String;
}Expand description
Trait for synchronous command handlers that can be registered with the terminal application.
All synchronous commands must implement this trait to be executable within the terminal app. Handlers receive mutable access to the application state and command arguments.
Required Methods§
Implementors§
impl<F> CommandHandler for F
Blanket implementation of CommandHandler for closures.
This allows simple closures to be used as command handlers without explicitly implementing the trait.