Trait ValueParserFactory
pub trait ValueParserFactory
Register a type with [value_parser!][crate::value_parser!]
Example
# use clap_builder as clap;
;
;
let parser: CustomValueParser = value_parser!;
Associated Types
type Parser;Generated parser, usually
ValueParser.It should at least be a type that supports
Into<ValueParser>. A non-ValueParsertype allows the caller to do further initialization on the parser.
Required Methods
fn value_parser() -> Self::ParserCreate the specified
Self::Parser
Implementors
impl ValueParserFactory for Box<OsStr>impl ValueParserFactory for Box<Path>impl ValueParserFactory for Box<str>impl ValueParserFactory for OsStringimpl ValueParserFactory for PathBufimpl ValueParserFactory for Stringimpl ValueParserFactory for boolimpl ValueParserFactory for i16impl ValueParserFactory for i32impl ValueParserFactory for i64impl ValueParserFactory for i8impl ValueParserFactory for u16impl ValueParserFactory for u32impl ValueParserFactory for u64impl ValueParserFactory for u8impl<T> ValueParserFactory for Arc<T> where T: ValueParserFactory + Send + Sync + Clone, <T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,impl<T> ValueParserFactory for Box<T> where T: ValueParserFactory + Send + Sync + Clone, <T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,impl<T> ValueParserFactory for Saturating<T> where T: ValueParserFactory + Send + Sync + Clone, <T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,impl<T> ValueParserFactory for Wrapping<T> where T: ValueParserFactory + Send + Sync + Clone, <T as ValueParserFactory>::Parser: TypedValueParser<Value = T>,