[−][src]Trait simon::Arg
Associated Types
Loading content...Required methods
fn update_switches<S: Switches>(&self, switches: &mut S)
fn name(&self) -> String
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
Provided methods
fn validate(&self) -> Result<(), Invalid>
fn parse_specified_ignoring_validation<I>(
self,
program_name: String,
args: I
) -> ParseResult<Self::Item, Self::Error> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
self,
program_name: String,
args: I
) -> ParseResult<Self::Item, Self::Error> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
fn parse_specified<I>(
self,
program_name: String,
args: I
) -> ParseResult<Self::Item, Self::Error> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
self,
program_name: String,
args: I
) -> ParseResult<Self::Item, Self::Error> where
I: IntoIterator,
I::Item: AsRef<OsStr>,
fn parse_env(self) -> ParseResult<Self::Item, Self::Error>
fn with_help(self, help_flag: Flag) -> WithHelp<Self>
fn with_help_default(self) -> WithHelp<Self>
fn option_map<F, T, U>(self, f: F) -> OptionMap<Self, F> where
F: FnOnce(T) -> U,
F: FnOnce(T) -> U,
fn with_default<T>(self, default_value: T) -> WithDefault<Self, T>
fn choice<O>(self, other: O) -> Choice<Self, O> where
O: Arg<Item = Self::Item>,
O: Arg<Item = Self::Item>,
fn both<O>(self, other: O) -> Both<Self, O> where
O: Arg,
O: Arg,
fn map<F, U>(self, f: F) -> Map<Self, F> where
F: FnOnce(Self::Item) -> U,
F: FnOnce(Self::Item) -> U,
fn required(self) -> Required<Self>
fn convert_string<F, T, E>(self, f: F) -> ConvertString<Self, F> where
F: FnOnce(&str) -> Result<T, E>,
F: FnOnce(&str) -> Result<T, E>,
fn option_convert_string<F, T, E>(self, f: F) -> OptionConvertString<Self, F> where
F: FnOnce(&str) -> Result<T, E>,
F: FnOnce(&str) -> Result<T, E>,
fn vec_convert_string<F, T, E>(self, f: F) -> VecConvertString<Self, F> where
F: FnMut(&str) -> Result<T, E>,
F: FnMut(&str) -> Result<T, E>,
fn depend<O>(self, other: O) -> Depend<Self, O> where
O: Arg,
O: Arg,
fn some_if<T>(self, t: T) -> SomeIf<Self, T>
Implementors
impl Arg for Flag
[src]
type Item = bool
type Error = Never
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl Arg for Free
[src]
type Item = Vec<String>
type Error = Never
fn update_switches<S: Switches>(&self, _switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl Arg for Opt
[src]
type Item = Option<String>
type Error = Never
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A> Arg for WithHelp<A> where
A: Arg,
[src]
A: Arg,
type Item = OrHelp<A::Item>
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, B> Arg for Both<A, B> where
A: Arg,
B: Arg,
[src]
A: Arg,
B: Arg,
type Item = (A::Item, B::Item)
type Error = BothError<A::Error, B::Error>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, B, T> Arg for Choice<A, B> where
A: Arg<Item = Option<T>>,
B: Arg<Item = Option<T>>,
[src]
A: Arg<Item = Option<T>>,
B: Arg<Item = Option<T>>,
type Item = Option<T>
type Error = ChoiceError<A::Error, B::Error>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, F, T, E> Arg for ConvertString<A, F> where
A: Arg<Item = String>,
F: FnOnce(&str) -> Result<T, E>,
E: Display + Debug,
[src]
A: Arg<Item = String>,
F: FnOnce(&str) -> Result<T, E>,
E: Display + Debug,
type Item = T
type Error = ConvertStringError<A::Error, E>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, F, T, E> Arg for OptionConvertString<A, F> where
A: Arg<Item = Option<String>>,
F: FnOnce(&str) -> Result<T, E>,
E: Display + Debug,
[src]
A: Arg<Item = Option<String>>,
F: FnOnce(&str) -> Result<T, E>,
E: Display + Debug,
type Item = Option<T>
type Error = OptionConvertStringError<A::Error, E>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, F, T, E> Arg for VecConvertString<A, F> where
A: Arg<Item = Vec<String>>,
F: FnMut(&str) -> Result<T, E>,
E: Display + Debug,
[src]
A: Arg<Item = Vec<String>>,
F: FnMut(&str) -> Result<T, E>,
E: Display + Debug,
type Item = Vec<T>
type Error = VecConvertStringError<A::Error, E>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, F, T, U> Arg for OptionMap<A, F> where
A: Arg<Item = Option<T>>,
F: FnOnce(T) -> U,
[src]
A: Arg<Item = Option<T>>,
F: FnOnce(T) -> U,
type Item = Option<U>
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, T> Arg for Required<A> where
A: Arg<Item = Option<T>>,
[src]
A: Arg<Item = Option<T>>,
type Item = T
type Error = RequiredError<A::Error>
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, T> Arg for SomeIf<A, T> where
A: Arg<Item = bool>,
[src]
A: Arg<Item = bool>,
type Item = Option<T>
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, T> Arg for WithDefault<A, T> where
A: Arg<Item = Option<T>>,
[src]
A: Arg<Item = Option<T>>,
type Item = T
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<A, U, F> Arg for Map<A, F> where
A: Arg,
F: FnOnce(A::Item) -> U,
[src]
A: Arg,
F: FnOnce(A::Item) -> U,
type Item = U
type Error = A::Error
fn update_switches<S: Switches>(&self, switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<T> Arg for Value<T>
[src]
type Item = T
type Error = Never
fn update_switches<S: Switches>(&self, _switches: &mut S)
[src]
fn name(&self) -> String
[src]
fn get(self, _matches: &Matches) -> Result<Self::Item, Self::Error>
[src]
impl<T, U, A, B> Arg for Depend<A, B> where
A: Arg<Item = Option<T>>,
B: Arg<Item = Option<U>>,
[src]
A: Arg<Item = Option<T>>,
B: Arg<Item = Option<U>>,