pub trait Command<Context> {
// Required methods
fn name() -> &'static str
where Self: Sized;
fn build_from_command_name_str(
input: &str,
) -> Result<Self, Box<dyn Error + Send + Sync + 'static>>
where Self: Sized;
fn args_are_valid(args: &[&str]) -> bool
where Self: Sized;
fn execute(
&self,
arguments: Vec<String>,
context: &mut Context,
) -> Result<(), Box<dyn Error + Send + Sync + 'static>>;
}Required Methods§
Sourcefn name() -> &'static strwhere
Self: Sized,
fn name() -> &'static strwhere
Self: Sized,
The name of the command, what a user has to type to find the command and execute