pub struct CommandDescription {
pub path: Vec<&'static str>,
pub doc: &'static str,
pub argument_names: &'static [&'static str],
pub arguments: Vec<ArgumentInfo>,
pub context: Vec<ArgumentInfo>,
pub conventions: Conventions,
}Expand description
Describes one command as a describing interpretation observes it.
Its path comes from the program, its documentation and argument names from the reified operation, and its arguments from the declared sources.
Fields§
§path: Vec<&'static str>The subcommand names leading to the command, ending with its own name.
doc: &'static strThe documentation of the extension method the command applies.
argument_names: &'static [&'static str]The argument names of the extension method, in order.
arguments: Vec<ArgumentInfo>Every argument with the source it is read from, in the operation’s order.
context: Vec<ArgumentInfo>The global arguments of every context the command is applied within, outermost first.
conventions: ConventionsHow the command’s words are read as its options and operands.
Implementations§
Trait Implementations§
Source§impl Clone for CommandDescription
impl Clone for CommandDescription
Source§impl Debug for CommandDescription
impl Debug for CommandDescription
impl Eq for CommandDescription
Source§impl PartialEq for CommandDescription
impl PartialEq for CommandDescription
impl StructuralPartialEq for CommandDescription
Auto Trait Implementations§
impl Freeze for CommandDescription
impl RefUnwindSafe for CommandDescription
impl Send for CommandDescription
impl Sync for CommandDescription
impl Unpin for CommandDescription
impl UnsafeUnpin for CommandDescription
impl UnwindSafe for CommandDescription
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<This> CliDeclarationLawsExt<This> for This
impl<This> CliDeclarationLawsExt<This> for This
Source§fn law_cli_declaration<Operation, Sources, Mode, Commands>(
&self,
name: &'static str,
operation: Operation,
sources: Sources,
mode: Mode,
conventions: Conventions,
) -> Result<(), &'static str>where
This: CliOperationAlg<Operation, Sources, Mode, Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Operation: OperationAlg,
Sources: CliSources<<Operation as OperationAlg>::Args>,
fn law_cli_declaration<Operation, Sources, Mode, Commands>(
&self,
name: &'static str,
operation: Operation,
sources: Sources,
mode: Mode,
conventions: Conventions,
) -> Result<(), &'static str>where
This: CliOperationAlg<Operation, Sources, Mode, Commands = Commands> + CliCommandsObserved<Commands = Commands>,
Operation: OperationAlg,
Sources: CliSources<<Operation as OperationAlg>::Args>,
Checks that operation declared under name with sources describes exactly that, with
one argument per operation argument, in order, and distinct spellings and positions.
Source§impl<This> CliOutcomeLawsExt<This> for This
impl<This> CliOutcomeLawsExt<This> for This
Source§impl<This> CliProgramExt<This> for This
impl<This> CliProgramExt<This> for This
Source§fn compile_cli<Program>(
&self,
program: Program,
) -> <Program as CliProgramAlg<This>>::Commandswhere
Program: CliProgramAlg<This>,
fn compile_cli<Program>(
&self,
program: Program,
) -> <Program as CliProgramAlg<This>>::Commandswhere
Program: CliProgramAlg<This>,
Compiles a named CLI program with this interpreter.
impl<Source> CliStatedFor<ContextArg> for Source
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<This> ShapeProgramExt<This> for This
impl<This> ShapeProgramExt<This> for This
Source§fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
Folds a declaration with this interpretation.