pub struct SubCommand<'a> { /* private fields */ }Expand description
A sub-command line parser.
Used with SubCommandParser::command.
Implementations§
Source§impl<'a> SubCommand<'a>
impl<'a> SubCommand<'a>
Sourcepub fn about(self, description: impl Into<String>) -> Self
pub fn about(self, description: impl Into<String>) -> Self
Document the about message for this sub-command. If repeated, only the final help message will apply.
An about message documents the sub-command in full sentence/paragraph format.
We recommend allowing blarg to format this field (ex: it is not recommended to use line breaks '\n').
See SubCommandParser::command for usage.
Sourcepub fn add<T>(self, parameter: Parameter<'a, T>) -> Self
pub fn add<T>(self, parameter: Parameter<'a, T>) -> Self
Add an argument/option to the sub-command.
The order of argument parameters corresponds to their positional order during parsing. The order of option parameters does not affect the sub-command parser semantics.
See SubCommandParser::command for usage.
Auto Trait Implementations§
impl<'a> Freeze for SubCommand<'a>
impl<'a> !RefUnwindSafe for SubCommand<'a>
impl<'a> !Send for SubCommand<'a>
impl<'a> !Sync for SubCommand<'a>
impl<'a> Unpin for SubCommand<'a>
impl<'a> !UnwindSafe for SubCommand<'a>
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
Mutably borrows from an owned value. Read more