Trait pretty_exec::clap::builder::TypedValueParser
[−]pub trait TypedValueParser: 'static + Clone + Send + Sync {
type Value;
fn parse_ref(
&self,
cmd: &App<'_>,
arg: Option<&Arg<'_>>,
value: &OsStr
) -> Result<Self::Value, Error>;
fn parse(
&self,
cmd: &App<'_>,
arg: Option<&Arg<'_>>,
value: OsString
) -> Result<Self::Value, Error> { ... }
fn possible_values(
&self
) -> Option<Box<dyn Iterator<Item = PossibleValue<'static>>, Global>> { ... }
}Expand description
Parse/validate argument values
Required Associated Types
type Value
type Value
Argument’s value type
Required Methods
Provided Methods
Parse the argument value
When arg is None, an external subcommand value is being parsed.
fn possible_values(
&self
) -> Option<Box<dyn Iterator<Item = PossibleValue<'static>>, Global>>
fn possible_values(
&self
) -> Option<Box<dyn Iterator<Item = PossibleValue<'static>>, Global>>
Reflect on enumerated value properties
Error checking should not be done with this; it is mostly targeted at user-facing applications like errors and completion.