Skip to main content

Map

Struct Map 

Source
pub struct Map<F, U, G> { /* private fields */ }
Expand description

Map combinator

Implementations§

Source§

impl<F, U, G> Map<F, U, G>
where F: Future, G: FnOnce(F::Output) -> U,

Source

pub fn new(future: F, mapper: G) -> Self

Trait Implementations§

Source§

impl<F, U, G> Future for Map<F, U, G>
where F: Future, G: FnOnce(F::Output) -> U,

Source§

type Output = U

Source§

fn poll(&mut self) -> Poll<Self::Output>

Poll the future to check if it’s ready

Auto Trait Implementations§

§

impl<F, U, G> Freeze for Map<F, U, G>
where F: Freeze, G: Freeze,

§

impl<F, U, G> RefUnwindSafe for Map<F, U, G>

§

impl<F, U, G> Send for Map<F, U, G>
where F: Send, G: Send, U: Send,

§

impl<F, U, G> Sync for Map<F, U, G>
where F: Sync, G: Sync, U: Sync,

§

impl<F, U, G> Unpin for Map<F, U, G>
where F: Unpin, G: Unpin, U: Unpin,

§

impl<F, U, G> UnsafeUnpin for Map<F, U, G>
where F: UnsafeUnpin, G: UnsafeUnpin,

§

impl<F, U, G> UnwindSafe for Map<F, U, G>
where F: UnwindSafe, G: UnwindSafe, U: 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, 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.