pub type CommandHandler = Arc<dyn Fn(&str, Vec<String>) -> Pin<Box<dyn Future<Output = Result<String, CommandError>> + Send>> + Send + Sync>;Expand description
Type alias for async command handlers
Commands receive:
- The command name (for handlers that serve multiple commands)
- Command arguments as a vector of strings
Commands return:
- A result containing either a String output or a CommandError
Aliased Typeยง
pub struct CommandHandler { /* private fields */ }