pub struct Argument {
pub name: String,
pub help: String,
pub default_value: Option<Vec<String>>,
}Expand description
An argument is a positional parameter. It must come after any Options the command supports, and can have a default value if it is not specified by the user explicitly.
The final Argument for a Command can be variadic (that is, it can accept more than one value), but whether or not this is the case is a property of the Command, not of the Argument (because the Argument only stores a description of the argument, not its final value).
Fields§
§name: String§help: String§default_value: Option<Vec<String>>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Argument
impl RefUnwindSafe for Argument
impl Send for Argument
impl Sync for Argument
impl Unpin for Argument
impl UnwindSafe for Argument
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