#[non_exhaustive]pub enum OptValue {
None,
Optional,
OptionalNonEmpty,
Required,
RequiredNonEmpty,
}Expand description
Option’s value type.
Usually used with OptSpecs::option method. Variants of this enum
define if and how an option accepts a value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
Option does not accept a value.
Optional
Option accepts an optional value.
OptionalNonEmpty
Option accepts an optional value but empty string is not considered a value.
Required
Option requires a value.
RequiredNonEmpty
Option requires a value but empty string is not considered a value.
Trait Implementations§
impl StructuralPartialEq for OptValue
Auto Trait Implementations§
impl Freeze for OptValue
impl RefUnwindSafe for OptValue
impl Send for OptValue
impl Sync for OptValue
impl Unpin for OptValue
impl UnwindSafe for OptValue
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