pub struct Opt {
pub name: String,
pub alt_name: String,
pub short: String,
pub value: String,
pub def_val: String,
pub set: bool,
}Expand description
Option values to consume flags:
- -v or –verbose or –debug
- -q or –quiet or –batch
- -h or –help or –info
- -V or –version : print version and exit
The value could be pass or default as well, e.g. –verbose=true or –verbose=false, but the presence of the flag itself is enough to set it to true (–verbose), and absence means false.
Fields§
§name: StringThe name of the option
alt_name: StringThe alternate long name of the option
short: String§value: StringThe value of the option
def_val: StringThe default value of the option
set: boolThe value of the option was set
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Opt
impl RefUnwindSafe for Opt
impl Send for Opt
impl Sync for Opt
impl Unpin for Opt
impl UnsafeUnpin for Opt
impl UnwindSafe for Opt
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