pub enum Opt<'a> {
Switch(&'a str, &'a mut bool),
Arg(&'a str, &'a mut String),
SubSwitch(&'a str, FnSubSwitch<'a>),
SubArg(&'a str, FnSubArg<'a>),
Free(FnFree<'a>),
}
Expand description
Define options
Variants§
Switch(&'a str, &'a mut bool)
Represents an option that is true if given.
Arg(&'a str, &'a mut String)
Represents an option that takes an argument.
SubSwitch(&'a str, FnSubSwitch<'a>)
Represents an option whose argument may be parsed via a callback.
SubArg(&'a str, FnSubArg<'a>)
Represents an option whose argument and value may be parsed via a callback.
Free(FnFree<'a>)
Represents a set of arguments not bound to any options.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Opt<'a>
impl<'a> !RefUnwindSafe for Opt<'a>
impl<'a> !Send for Opt<'a>
impl<'a> !Sync for Opt<'a>
impl<'a> Unpin for Opt<'a>
impl<'a> !UnwindSafe for Opt<'a>
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