[−][src]Trait clapme::ClapMe
Any type of trait ClapMe
can be used as an argument value.
Provided methods
fn with_clap<T>(
_info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
_info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
Updates and returns the corresponding clap::App
.
fn from_clap(_name: &str, _app: &ArgMatches<'_>) -> Option<Self>
Parses the clap info to obtain a value. None
is returned if
the argument was not required, and was also not provided.
fn requires_flags(name: &str) -> Vec<String>
Parses the clap info to obtain a value. None
is returned if
the argument was not required, and was also not provided.
fn help_message(cmdname: &str) -> String
The help message for this struct. This is most useful for test cases.
fn from_args() -> Self
Parse command line arguments.
fn from_iter<I, T>(args: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse arguments given through an iterable thing such as a Vec
or a slice.
Implementations on Foreign Types
impl ClapMe for bool
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for f32
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<f32>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for f64
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<f64>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for IpAddr
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<IpAddr>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for Ipv4Addr
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<Ipv4Addr>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for Ipv6Addr
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<Ipv6Addr>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for SocketAddr
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<SocketAddr>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for SocketAddrV4
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<SocketAddrV4>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for SocketAddrV6
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<SocketAddrV6>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for i16
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<i16>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for isize
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<isize>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for i32
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<i32>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for i64
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<i64>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for i128
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<i128>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for u16
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<u16>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for u32
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<u32>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for u64
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<u64>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for u128
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<u128>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for usize
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<usize>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for String
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<String>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for PathBuf
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<PathBuf>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl ClapMe for OsString
[src]
fn with_clap<T>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> T
) -> T
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
impl ClapMe for Vec<OsString>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl<T: ClapMe> ClapMe for Option<T>
[src]
fn with_clap<TT>(
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
fn from_clap(name: &str, matches: &ArgMatches<'_>) -> Option<Self>
[src]
fn requires_flags(_name: &str) -> Vec<String>
[src]
impl<T> ClapMe for PhantomData<T>
[src]
fn with_clap<TT>(
_info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT
[src]
_info: ArgInfo<'_>,
app: App<'_, '_>,
f: impl FnOnce(App<'_, '_>) -> TT
) -> TT