pub struct Flag { /* private fields */ }
Expand description
Flag structure which represents command-line option.
Implementations§
Source§impl Flag
Flag structure implementation.
impl Flag
Flag structure implementation.
Sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Returns description.
Sourcepub fn default_value(&self) -> &Option<String>
pub fn default_value(&self) -> &Option<String>
Returns default value.
Sourcepub fn accepts_value(&self) -> bool
pub fn accepts_value(&self) -> bool
Returns true if the flag accepts value.
Source§impl Flag
Flag structure implementation.
impl Flag
Flag structure implementation.
pub fn with_name<S: Into<String>>(name: S) -> Self
Sourcepub fn with_alias<S: Into<String>>(self, val: S) -> Self
pub fn with_alias<S: Into<String>>(self, val: S) -> Self
Sets alias name.
Sourcepub fn with_description<S: Into<String>>(self, val: S) -> Self
pub fn with_description<S: Into<String>>(self, val: S) -> Self
Sets description.
Sourcepub fn with_default_value<S: Into<String>>(self, val: S) -> Self
pub fn with_default_value<S: Into<String>>(self, val: S) -> Self
Sets value.
Sourcepub fn accept_value(self) -> Self
pub fn accept_value(self) -> Self
Sets value.
Trait Implementations§
impl StructuralPartialEq for Flag
Auto Trait Implementations§
impl Freeze for Flag
impl RefUnwindSafe for Flag
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl UnwindSafe for Flag
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