Trait argle::Param [−][src]
pub trait Param { type Item; type Error: Debug + Display; fn update_options(&self, opts: &mut Options, notes: Notes); fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>; fn name(&self) -> String; fn parse<C: IntoIterator>(
&self,
args: C,
which_notes_to_document: WhichNotes
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage)
where
C::Item: AsRef<OsStr>, { ... } fn parse_env(
&self,
which_notes_to_document: WhichNotes,
program_name: ProgramName
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName) { ... } fn parse_env_default(
&self
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName) { ... } }
Associated Types
Required Methods
fn update_options(&self, opts: &mut Options, notes: Notes)
fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>
fn name(&self) -> String
Provided Methods
fn parse<C: IntoIterator>(
&self,
args: C,
which_notes_to_document: WhichNotes
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage) where
C::Item: AsRef<OsStr>,
&self,
args: C,
which_notes_to_document: WhichNotes
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage) where
C::Item: AsRef<OsStr>,
fn parse_env(
&self,
which_notes_to_document: WhichNotes,
program_name: ProgramName
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
&self,
which_notes_to_document: WhichNotes,
program_name: ProgramName
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
fn parse_env_default(
&self
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
&self
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
Implementors
impl Param for Arg type Item = Option<String>; type Error = Never;
impl Param for Flag type Item = bool; type Error = Never;
impl<A, U, F> Param for Map<A, F> where
A: Param,
F: Fn(A::Item) -> U, type Item = U; type Error = A::Error;impl<V> Param for WithHelp<V> where
V: Param, type Item = HelpOr<V::Item>; type Error = V::Error;impl<T, C, V> Param for Otherwise<C, V> where
C: Param<Item = Option<T>>,
V: Param, type Item = Either<T, V::Item>; type Error = Either<C::Error, V::Error>;impl<A, T> Param for SomeIf<A, T> where
T: Clone,
A: Param<Item = bool>, type Item = Option<T>; type Error = A::Error;impl<A, U, E, F> Param for TryMap<A, F> where
A: Param,
E: Debug + Display,
F: Fn(A::Item) -> Result<U, E>, type Item = U; type Error = TryMapError<A::Error, E>;impl<A, T, U, F> Param for OptMap<A, F> where
A: Param<Item = Option<T>>,
F: Fn(T) -> U, type Item = Option<U>; type Error = A::Error;impl<T, A, U, E, F> Param for OptTryMap<A, F> where
A: Param<Item = Option<T>>,
E: Debug + Display,
F: Fn(T) -> Result<U, E>, type Item = Option<U>; type Error = TryMapError<A::Error, E>;impl<A, B> Param for Join<A, B> where
A: Param,
B: Param, type Item = (A::Item, B::Item); type Error = JoinError<A::Error, B::Error>;impl<T, U, A, B> Param for Codepend<A, B> where
A: Param<Item = Option<T>>,
B: Param<Item = Option<U>>, type Item = Option<(T, U)>; type Error = CodependError<A::Error, B::Error>;impl<T, U, A, B> Param for Either<A, B> where
A: Param<Item = Option<T>>,
B: Param<Item = Option<U>>, type Item = Option<Either<T, U>>; type Error = EitherError<A::Error, B::Error>;impl<T, A, B> Param for EitherHomogeneous<A, B> where
A: Param<Item = Option<T>>,
B: Param<Item = Option<T>>, type Item = Option<T>; type Error = EitherError<A::Error, B::Error>;impl<P, T> Param for WithDefault<P, T> where
T: Clone + Display,
P: Param<Item = Option<T>>, type Item = T; type Error = P::Error;impl<P, T> Param for Required<P> where
P: Param<Item = Option<T>>, type Item = T; type Error = RequiredError<P::Error>;impl<A, F, U, E> Param for Convert<A, F> where
A: Param,
A::Item: Clone + Debug + Display,
E: Debug + Display,
F: Fn(&A::Item) -> Result<U, E>, type Item = U; type Error = ConvertError<A::Error, A::Item, E>;impl<T, A, U, F, E> Param for OptConvert<A, F> where
T: Clone + Debug + Display,
E: Clone + Debug + Display,
A: Param<Item = Option<T>>,
F: Fn(T) -> Result<U, E>, type Item = Option<U>; type Error = ConvertError<A::Error, T, E>;impl<P> Param for Rename<P> where
P: Param, type Item = P::Item; type Error = P::Error;impl<P> Param for AddNote<P> where
P: Param, type Item = P::Item; type Error = P::Error;impl<P> Param for SetNotesToDocument<P> where
P: Param, type Item = P::Item; type Error = P::Error;impl<T> Param for Value<T> where
T: Clone, type Item = T; type Error = Never;