pub struct ArgDoc {
pub name: String,
pub long: Option<String>,
pub short: Option<char>,
pub positional: bool,
pub help: String,
pub value_name: Option<String>,
pub takes_value: bool,
pub required: bool,
pub global: bool,
pub possible_values: Vec<PossibleValueDoc>,
pub defaults: Vec<String>,
}Expand description
One argument of a command.
Fields§
§name: StringThe argument’s id, transport.
long: Option<String>--transport, without the dashes.
short: Option<char>-t, without the dash.
positional: boolGiven by position rather than by flag.
help: StringThe help text.
value_name: Option<String>The placeholder for the value, PATH.
takes_value: boolWhether the argument takes a value at all (a flag does not).
required: boolMust be given.
global: boolAccepted by every command under the one that declares it.
possible_values: Vec<PossibleValueDoc>The values a value-enum argument accepts, with the help of each; empty for any other argument. Always present, so a template can ask for its length.
defaults: Vec<String>The default value(s), as clap renders them; empty when there is none.
Trait Implementations§
impl Eq for ArgDoc
impl StructuralPartialEq for ArgDoc
Auto Trait Implementations§
impl Freeze for ArgDoc
impl RefUnwindSafe for ArgDoc
impl Send for ArgDoc
impl Sync for ArgDoc
impl Unpin for ArgDoc
impl UnsafeUnpin for ArgDoc
impl UnwindSafe for ArgDoc
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.