pub enum OptionHasValue {
Always,
IfPossible,
Never,
}Expand description
Specifies how a matcher determines whether an option includes a value.
Variants§
Always
Option must always include a value.
IfPossible
If it is possible for the next argument after the option code to be its value, then the matcher treats the option as having a value. Otherwise it is treated as not having a value.
This is only possible when a whitespace option value announcer is used.
Currently, if an option value which begins with an option announcer, it cannot be a possible value for an
option when IfPossible is specified. That is,
Matcher.option_value_can_start_with_option_announcer is
ignored when IfPossible is specified.
Never
Option never has a value. It is used as a flag.
Trait Implementations§
Source§impl Debug for OptionHasValue
impl Debug for OptionHasValue
Source§impl PartialEq for OptionHasValue
impl PartialEq for OptionHasValue
impl Eq for OptionHasValue
impl StructuralPartialEq for OptionHasValue
Auto Trait Implementations§
impl Freeze for OptionHasValue
impl RefUnwindSafe for OptionHasValue
impl Send for OptionHasValue
impl Sync for OptionHasValue
impl Unpin for OptionHasValue
impl UnwindSafe for OptionHasValue
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