Struct arg_combinators::ext::ArgExt [−][src]
pub struct ArgExt<A> { /* fields omitted */ }
Methods
impl<A> ArgExt<A> where
A: Arg,
[src]
impl<A> ArgExt<A> where
A: Arg,
pub fn result_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = E>> where
E: Debug + Display,
F: Fn(Result<A::Item, A::Error>) -> Result<U, E>,
[src]
pub fn result_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = E>> where
E: Debug + Display,
F: Fn(Result<A::Item, A::Error>) -> Result<U, E>,
pub fn result_both<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = (Result<A::Item, A::Error>, Result<B::Item, B::Error>), Error = Never>> where
B: Arg,
Self: Sized,
[src]
pub fn result_both<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = (Result<A::Item, A::Error>, Result<B::Item, B::Error>), Error = Never>> where
B: Arg,
Self: Sized,
pub fn both<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = (A::Item, B::Item), Error = BothError<A::Error, B::Error>>> where
B: Arg,
[src]
pub fn both<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = (A::Item, B::Item), Error = BothError<A::Error, B::Error>>> where
B: Arg,
pub fn try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(A::Item) -> Result<U, E>,
[src]
pub fn try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(A::Item) -> Result<U, E>,
pub fn map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = A::Error>> where
F: Fn(A::Item) -> U,
[src]
pub fn map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = A::Error>> where
F: Fn(A::Item) -> U,
pub fn convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = TryMapError<A::Error, ConvertFailed<A::Item, E>>>> where
A::Item: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(A::Item) -> Result<U, E>,
[src]
pub fn convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = U, Error = TryMapError<A::Error, ConvertFailed<A::Item, E>>>> where
A::Item: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(A::Item) -> Result<U, E>,
pub fn with_help(
self,
flag: Flag
) -> ArgExt<impl Arg<Item = HelpOr<A::Item>>>
[src]
pub fn with_help(
self,
flag: Flag
) -> ArgExt<impl Arg<Item = HelpOr<A::Item>>>
pub fn with_help_default(
self
) -> ArgExt<impl Arg<Item = HelpOr<A::Item>>>
[src]
pub fn with_help_default(
self
) -> ArgExt<impl Arg<Item = HelpOr<A::Item>>>
pub fn rename(
self,
name: &str
) -> ArgExt<impl Arg<Item = A::Item, Error = A::Error>>
[src]
pub fn rename(
self,
name: &str
) -> ArgExt<impl Arg<Item = A::Item, Error = A::Error>>
pub fn valid(self) -> Valid<A>
[src]
pub fn valid(self) -> Valid<A>
impl<A, T> ArgExt<A> where
A: Arg<Item = Option<T>>,
[src]
impl<A, T> ArgExt<A> where
A: Arg<Item = Option<T>>,
pub fn depend<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<(T, U)>, Error = DependError<A::Error, B::Error>>> where
B: Arg<Item = Option<U>>,
[src]
pub fn depend<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<(T, U)>, Error = DependError<A::Error, B::Error>>> where
B: Arg<Item = Option<U>>,
pub fn otherwise<U>(
self,
b: U
) -> ArgExt<impl Arg<Item = Either<T, U::Item>>> where
U: Arg,
[src]
pub fn otherwise<U>(
self,
b: U
) -> ArgExt<impl Arg<Item = Either<T, U::Item>>> where
U: Arg,
pub fn option_try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(T) -> Result<U, E>,
[src]
pub fn option_try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(T) -> Result<U, E>,
pub fn option_map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = A::Error>> where
F: Fn(T) -> U,
[src]
pub fn option_map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = A::Error>> where
F: Fn(T) -> U,
pub fn either_or_both_any<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<EitherOrBoth<T, U>>>> where
B: Arg<Item = Option<U>>,
[src]
pub fn either_or_both_any<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<EitherOrBoth<T, U>>>> where
B: Arg<Item = Option<U>>,
pub fn either_any<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<Either<T, U>>>> where
B: Arg<Item = Option<U>>,
[src]
pub fn either_any<B, U>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<Either<T, U>>>> where
B: Arg<Item = Option<U>>,
pub fn either<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<T>>> where
B: Arg<Item = Option<T>>,
[src]
pub fn either<B>(
self,
b: B
) -> ArgExt<impl Arg<Item = Option<T>>> where
B: Arg<Item = Option<T>>,
pub fn with_default(
self,
t: T
) -> ArgExt<impl Arg<Item = T>> where
T: Clone,
[src]
pub fn with_default(
self,
t: T
) -> ArgExt<impl Arg<Item = T>> where
T: Clone,
pub fn required(
self
) -> ArgExt<impl Arg<Item = T, Error = TryMapError<A::Error, MissingRequiredArg>>>
[src]
pub fn required(
self
) -> ArgExt<impl Arg<Item = T, Error = TryMapError<A::Error, MissingRequiredArg>>>
pub fn option_convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = TryMapError<A::Error, ConvertFailed<T, E>>>> where
T: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(T) -> Result<U, E>,
[src]
pub fn option_convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Option<U>, Error = TryMapError<A::Error, ConvertFailed<T, E>>>> where
T: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(T) -> Result<U, E>,
impl<A> ArgExt<A> where
A: Arg<Item = bool>,
[src]
impl<A> ArgExt<A> where
A: Arg<Item = bool>,
pub fn some_if<T>(
self,
t: T
) -> ArgExt<impl Arg<Item = Option<T>>> where
T: Clone,
[src]
pub fn some_if<T>(
self,
t: T
) -> ArgExt<impl Arg<Item = Option<T>>> where
T: Clone,
pub fn unit_option(
self
) -> ArgExt<impl Arg<Item = Option<()>>>
[src]
pub fn unit_option(
self
) -> ArgExt<impl Arg<Item = Option<()>>>
pub fn unless<U>(
self,
b: U
) -> ArgExt<impl Arg<Item = Option<U::Item>>> where
U: Arg,
[src]
pub fn unless<U>(
self,
b: U
) -> ArgExt<impl Arg<Item = Option<U::Item>>> where
U: Arg,
impl<A, I> ArgExt<A> where
A: Arg<Item = I>,
I: IntoIterator,
[src]
impl<A, I> ArgExt<A> where
A: Arg<Item = I>,
I: IntoIterator,
pub fn into_iter(
self
) -> ArgExt<impl Arg<Item = I::IntoIter>>
[src]
pub fn into_iter(
self
) -> ArgExt<impl Arg<Item = I::IntoIter>>
pub fn vec_try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(I::Item) -> Result<U, E>,
[src]
pub fn vec_try_map<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = TryMapError<A::Error, E>>> where
E: Debug + Display,
F: Fn(I::Item) -> Result<U, E>,
pub fn vec_map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = A::Error>> where
F: Fn(I::Item) -> U,
[src]
pub fn vec_map<F, U>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = A::Error>> where
F: Fn(I::Item) -> U,
pub fn vec_convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = TryMapError<A::Error, ConvertFailed<I::Item, E>>>> where
I::Item: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(I::Item) -> Result<U, E>,
[src]
pub fn vec_convert<F, U, E>(
self,
f: F
) -> ArgExt<impl Arg<Item = Vec<U>, Error = TryMapError<A::Error, ConvertFailed<I::Item, E>>>> where
I::Item: Clone + Debug + Display,
E: Clone + Debug + Display,
F: Fn(I::Item) -> Result<U, E>,
impl<A, I, T, E> ArgExt<A> where
E: Debug + Display,
A: Arg<Item = I>,
I: IntoIterator<Item = Result<T, E>>,
[src]
impl<A, I, T, E> ArgExt<A> where
E: Debug + Display,
A: Arg<Item = I>,
I: IntoIterator<Item = Result<T, E>>,
pub fn vec_ok_or_first_err(
self
) -> ArgExt<impl Arg<Item = Vec<T>, Error = TryMapError<A::Error, E>>>
[src]
pub fn vec_ok_or_first_err(
self
) -> ArgExt<impl Arg<Item = Vec<T>, Error = TryMapError<A::Error, E>>>
impl<A, I> ArgExt<A> where
A: Arg<Item = I>,
I: Iterator,
[src]
impl<A, I> ArgExt<A> where
A: Arg<Item = I>,
I: Iterator,
Trait Implementations
impl<A> Arg for ArgExt<A> where
A: Arg,
[src]
impl<A> Arg for ArgExt<A> where
A: Arg,
type Item = A::Item
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn update_switches<S: Switches>(&self, switches: &mut S)
fn name(&self) -> String
[src]
fn name(&self) -> String
fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>
fn parse<I>(
&self,
args: I
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage) where
I: IntoIterator,
I::Item: AsRef<OsStr>,
[src]
fn parse<I>(
&self,
args: I
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage) where
I: IntoIterator,
I::Item: AsRef<OsStr>,
fn validate(&self) -> Option<Invalid>
[src]
fn validate(&self) -> Option<Invalid>
fn parse_env(
&self,
program_name: ProgramName
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
[src]
fn parse_env(
&self,
program_name: ProgramName
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
fn parse_env_default(
&self
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
[src]
fn parse_env_default(
&self
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
fn just_parse<I>(
&self,
args: I
) -> Result<Self::Item, TopLevelError<Self::Error>> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
[src]
fn just_parse<I>(
&self,
args: I
) -> Result<Self::Item, TopLevelError<Self::Error>> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
fn just_parse_env(
&self,
program_name: ProgramName
) -> Result<Self::Item, TopLevelError<Self::Error>>
[src]
fn just_parse_env(
&self,
program_name: ProgramName
) -> Result<Self::Item, TopLevelError<Self::Error>>
fn just_parse_env_default(
&self
) -> Result<Self::Item, TopLevelError<Self::Error>>
[src]
fn just_parse_env_default(
&self
) -> Result<Self::Item, TopLevelError<Self::Error>>