[−][src]Trait parse_arg::ParseArgFromStr
Shorthand for implementing ParseArg
for types that already implement FromStr
.
This trait allows to implement ParseArg
cheaply, just by providing the description. Prefer
this approach if your type already impls FromStr
without copying the string. In case the
implementation can be made more performant by directly implementing ParseArg
, prefer direct
implementation. (This is what String
does for example.)
This trait should only be implemented - do not use it as a bound! Use ParseArg
as a bound
because it is more general and provides same features.
Required methods
fn describe_type<W: Write>(writer: W) -> Result
Writes human-readable description of the type to the writer.
For full information, read the documentation for ParseArgs::describe_type
.
ParseArgs::describe_type
is delegated to this method when ParseArgFromStr
is
implmented.