pub trait Command {
// Required methods
fn name(&self) -> &str;
fn execute(&self, args: &[String]);
// Provided methods
fn aliases(&self) -> &[&str] { ... }
fn help(&self) -> Option<&str> { ... }
fn hidden(&self) -> bool { ... }
fn validate(&self, _args: &[String]) -> Result<(), String> { ... }
}
Expand description
Defines the trait for commands to implement.