pub trait AbstractCommand {
// Required method
fn command_name(&self) -> CommandName;
// Provided methods
fn spec(&self) -> &'static CommandSpec { ... }
fn load<I, S>(&self, args: I) -> Result<ActionInvocation, CommandParseError>
where I: IntoIterator<Item = S>,
S: Into<String> { ... }
}Expand description
Typed Rust equivalent of upstream AbstractCommand.
Upstream command classes bind a concrete action and register a commander
callback. In this port the commander callback is represented by load,
which parses command-local arguments into the same action invocation shape.
Required Methods§
fn command_name(&self) -> CommandName
Provided Methods§
fn spec(&self) -> &'static CommandSpec
fn load<I, S>(&self, args: I) -> Result<ActionInvocation, CommandParseError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".