pub struct OptionOccurrence {
pub discriminant: String,
pub params: HashMap<String, String>,
}Expand description
A single occurrence of a repeatable option
Produced when a repeatable: true option is encountered on the
command line: --output csv file=results.csv resolution=100 becomes
OptionOccurrence { discriminant: "csv", params: {"file": "results.csv", "resolution": "100"} }.
params values are stored as strings after type validation against
option_parameters[discriminant], consistent with how scalar option
and argument values are stored (see ParsedValue::Scalar).
Fields§
§discriminant: StringThe token immediately following the flag, validated against the
option’s choices.
params: HashMap<String, String>The key=value pairs supplied for this occurrence.
Trait Implementations§
Source§impl Clone for OptionOccurrence
impl Clone for OptionOccurrence
Source§fn clone(&self) -> OptionOccurrence
fn clone(&self) -> OptionOccurrence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionOccurrence
impl Debug for OptionOccurrence
Source§impl PartialEq for OptionOccurrence
impl PartialEq for OptionOccurrence
impl StructuralPartialEq for OptionOccurrence
Auto Trait Implementations§
impl Freeze for OptionOccurrence
impl RefUnwindSafe for OptionOccurrence
impl Send for OptionOccurrence
impl Sync for OptionOccurrence
impl Unpin for OptionOccurrence
impl UnsafeUnpin for OptionOccurrence
impl UnwindSafe for OptionOccurrence
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more