[−][src]Struct pflag::Flag
A Flag represents the state of a flag.
Fields
name: &'a str
name as it appears on command line
shorthand: &'a str
one-letter abbreviated flag
usage: &'a str
help message
value: Box<dyn Value>
value as set
def_value: &'a str
default value (as text); for usage message
changed: bool
If the user set the value (or if left to default)
no_opt_def_value: &'a str
default value (as text); if the flag is on the command line without any options
deprecated: &'a str
If this flag is deprecated, this string is the new or now thing to use
used by cobra.Command to allow flags to be hidden from help/usage text
shorthand_deprecated: &'a str
If the shorthand of this flag is deprecated, this string is the new or now thing to use
Implementations
impl<'a> Flag<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Flag<'a>
impl<'a> !Send for Flag<'a>
impl<'a> !Sync for Flag<'a>
impl<'a> Unpin for Flag<'a>
impl<'a> !UnwindSafe for Flag<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,