Struct Map

Source
pub struct Map<A, F> { /* private fields */ }

Trait Implementations§

Source§

impl<A, U, F> Param for Map<A, F>
where A: Param, F: Fn(A::Item) -> U,

Source§

type Item = U

Source§

type Error = <A as Param>::Error

Source§

fn update_options(&self, opts: &mut Options, notes: Notes)

Source§

fn name(&self) -> String

Source§

fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>

Source§

fn parse<C: IntoIterator>( &self, args: C, which_notes_to_document: WhichNotes, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage)
where C::Item: AsRef<OsStr>,

Source§

fn parse_env( &self, which_notes_to_document: WhichNotes, program_name: ProgramName, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)

Source§

fn parse_env_default( &self, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)

Auto Trait Implementations§

§

impl<A, F> Freeze for Map<A, F>
where A: Freeze, F: Freeze,

§

impl<A, F> RefUnwindSafe for Map<A, F>

§

impl<A, F> Send for Map<A, F>
where A: Send, F: Send,

§

impl<A, F> Sync for Map<A, F>
where A: Sync, F: Sync,

§

impl<A, F> Unpin for Map<A, F>
where A: Unpin, F: Unpin,

§

impl<A, F> UnwindSafe for Map<A, F>
where A: UnwindSafe, F: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P> ParamBoolExt for P
where P: Param<Item = bool> + ?Sized,

Source§

fn some_if<T>(self, value: T) -> SomeIf<Self, T>
where Self: Sized,

Source§

fn unit_option(self) -> UnitOption<Self>
where Self: Sized,

Source§

impl<P> ParamExt for P
where P: Param + ?Sized,

Source§

fn map<U, F>(self, f: F) -> Map<Self, F>
where F: Fn(Self::Item) -> U, Self: Sized,

Source§

fn try_map<U, E, F>(self, f: F) -> TryMap<Self, F>
where E: Debug, F: Fn(Self::Item) -> Result<U, E>, Self: Sized,

Source§

fn join<B>(self, b: B) -> Join<Self, B>
where B: Param, Self: Sized,

Source§

fn convert<F, U, E>(self, f: F) -> Convert<Self, F>
where E: Debug + Display, F: Fn(&Self::Item) -> Result<U, E>, Self: Sized, Self::Item: Clone + Debug,

Source§

fn rename(self, name: String) -> Rename<Self>
where Self: Sized,

Source§

fn add_note(self, note: Note) -> AddNote<Self>
where Self: Sized,

Source§

fn set_notes_to_document( self, which_notes_to_document: WhichNotes, ) -> SetNotesToDocument<Self>
where Self: Sized,

Source§

fn with_help(self, help: Flag) -> WithHelp<Self>
where Self: Sized,

Source§

fn with_default_help(self) -> WithHelp<Self>
where Self: Sized,

Source§

impl<T, P> ParamOptExt for P
where P: Param<Item = Option<T>> + ?Sized,

Source§

type OptItem = T

Source§

fn opt_map<U, F>(self, f: F) -> OptMap<Self, F>
where F: Fn(Self::OptItem) -> U, Self: Sized,

Source§

fn opt_try_map<U, E, F>(self, f: F) -> OptTryMap<Self, F>
where E: Debug, F: Fn(Self::OptItem) -> Result<U, E>, Self: Sized,

Source§

fn codepend<B>(self, b: B) -> Codepend<Self, B>
where B: ParamOptExt, Self: Sized,

Source§

fn either<B>(self, b: B) -> Either<Self, B>
where B: ParamOptExt, Self: Sized,

Source§

fn either_homogeneous<B>(self, b: B) -> EitherHomogeneous<Self, B>
where B: ParamOptExt<OptItem = Self::OptItem>, Self: Sized,

Source§

fn with_default( self, default: Self::OptItem, ) -> WithDefault<Self, Self::OptItem>
where Self: Sized,

Source§

fn required(self) -> Required<Self>
where Self: Sized,

Source§

fn opt_convert<F, U, E>(self, f: F) -> OptConvert<Self, F>
where E: Debug + Display, F: Fn(Self::OptItem) -> Result<U, E>, Self: Sized, Self::OptItem: Clone + Debug,

Source§

fn otherwise<B>(self, b: B) -> Otherwise<Self, B>
where B: Param, Self: Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.