Map

Struct Map 

Source
pub struct Map<F, D: ?Sized>(pub F, pub D);

Tuple Fields§

§0: F§1: D

Implementations§

Source§

impl<F, D> Map<F, D>

Source

pub fn new<I, G>(f: G, inner: I) -> Map<F, D>
where G: Into<F>, I: Into<D>,

Trait Implementations§

Source§

impl<F, D: ?Sized> AsMut<D> for Map<F, D>

Source§

fn as_mut(&mut self) -> &mut D

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<F, D: ?Sized> AsRef<D> for Map<F, D>

Source§

fn as_ref(&self) -> &D

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<F: Clone, D: Clone + ?Sized> Clone for Map<F, D>

Source§

fn clone(&self) -> Map<F, D>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F: Debug, D: Debug + ?Sized> Debug for Map<F, D>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: Default, D: Default + ?Sized> Default for Map<F, D>

Source§

fn default() -> Map<F, D>

Returns the “default value” for a type. Read more
Source§

impl<'a, K: 'a, J: 'a, F, D> Discriminator<'a, K> for Map<F, D>
where D: Discriminator<'a, J> + ?Sized, F: Fn(K) -> J,

Source§

fn discriminate_sorted<V: 'a, I>( &'a self, pairs: I, ) -> DiscriminateSorted<'a, K, V>

Source§

fn by_ref(&'a self) -> &'a Self

Source§

fn invert(self) -> Invert<Self>
where Self: Sized,

Source§

fn map_key<J: 'a, F>(self, f: F) -> Map<F, Self>
where Self: Sized, F: Fn(J) -> K,

Source§

fn sum_left<J: 'a, D>(self, other: D) -> Sum<Self, D>
where Self: Sized, D: Discriminator<'a, J>,

Source§

fn sum_right<J: 'a, D>(self, other: D) -> Sum<Self, D>
where Self: Sized, D: Discriminator<'a, J>,

Source§

fn product_left<J: 'a, D>(self, other: D) -> Product<Self, D>
where Self: Sized, D: Discriminator<'a, J>,

Source§

fn product_right<J: 'a, D>(self, other: D) -> Product<Self, D>
where Self: Sized, D: Discriminator<'a, J>,

Source§

impl<F: Copy, D: Copy + ?Sized> Copy for Map<F, D>

Auto Trait Implementations§

§

impl<F, D> Freeze for Map<F, D>
where F: Freeze, D: Freeze + ?Sized,

§

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

§

impl<F, D> Send for Map<F, D>
where F: Send, D: Send + ?Sized,

§

impl<F, D> Sync for Map<F, D>
where F: Sync, D: Sync + ?Sized,

§

impl<F, D> Unpin for Map<F, D>
where F: Unpin, D: Unpin + ?Sized,

§

impl<F, D> UnwindSafe for Map<F, D>
where F: UnwindSafe, D: UnwindSafe + ?Sized,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> Erased for T