[−][src]Struct pflag::Flag
A Flag represents the state of a flag.
Fields
name: String
name as it appears on command line
shorthand: char
one-letter abbreviated flag
usage: String
help message
value: Box<dyn Value>
value as set
def_value: String
default value (as text); for usage message
changed: bool
If the user set the value (or if left to default)
no_opt_def_value: String
default value (as text); if the flag is on the command line without any options
deprecated: String
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: String
If the shorthand of this flag is deprecated, this string is the new or now thing to use
Implementations
impl Flag
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Flag
impl !Send for Flag
impl !Sync for Flag
impl Unpin for Flag
impl !UnwindSafe for Flag
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,
pub 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.
pub 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>,