Trait Command
Source pub trait Command:
Send
+ Sync
+ Debug
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn matches(&self, command: &str) -> bool;
fn execute_sync(&self, args: &[&str]) -> Result<String>;
// Provided methods
fn execute_async<'a>(
&'a self,
args: &'a [&'a str],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'a>> { ... }
fn supports_async(&self) -> bool { ... }
fn priority(&self) -> u8 { ... }
fn is_available(&self) -> bool { ... }
}