Skip to main content

Map

Struct Map 

Source
pub struct Map<Next, Func> { /* private fields */ }
Expand description

Push combinator that transforms each item with a closure before pushing downstream.

Trait Implementations§

Source§

impl<Next: Clone, Func: Clone> Clone for Map<Next, Func>

Source§

fn clone(&self) -> Map<Next, Func>

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<Next: Debug, Func: Debug> Debug for Map<Next, Func>

Source§

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

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

impl<Next, Func, In, Out, Meta> Push<In, Meta> for Map<Next, Func>
where Next: Push<Out, Meta>, Func: FnMut(In) -> Out, Meta: Copy,

Source§

type Ctx<'ctx> = <Next as Push<Out, Meta>>::Ctx<'ctx>

The context type required to push into this pipeline.
Source§

type CanPend = <Next as Push<Out, Meta>>::CanPend

Whether this push can return PushStep::Pending.
Source§

fn poll_ready( self: Pin<&mut Self>, ctx: &mut Self::Ctx<'_>, ) -> PushStep<Self::CanPend>

Check if this push is ready to accept an item.
Source§

fn start_send(self: Pin<&mut Self>, item: In, meta: Meta)

Send an item into this push pipeline. Read more
Source§

fn poll_flush( self: Pin<&mut Self>, ctx: &mut Self::Ctx<'_>, ) -> PushStep<Self::CanPend>

Flushes any buffered items in this push pipeline.
Source§

fn size_hint(self: Pin<&mut Self>, hint: (usize, Option<usize>))

Informs this push how many items are about to be sent. Read more
Source§

impl<'__pin, Next, Func> Unpin for Map<Next, Func>
where PinnedFieldsOf<__Origin<'__pin, Next, Func>>: Unpin,

Auto Trait Implementations§

§

impl<Next, Func> Freeze for Map<Next, Func>
where Next: Freeze, Func: Freeze,

§

impl<Next, Func> RefUnwindSafe for Map<Next, Func>
where Next: RefUnwindSafe, Func: RefUnwindSafe,

§

impl<Next, Func> Send for Map<Next, Func>
where Next: Send, Func: Send,

§

impl<Next, Func> Sync for Map<Next, Func>
where Next: Sync, Func: Sync,

§

impl<Next, Func> UnsafeUnpin for Map<Next, Func>
where Next: UnsafeUnpin, Func: UnsafeUnpin,

§

impl<Next, Func> UnwindSafe for Map<Next, Func>
where Next: UnwindSafe, Func: 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> 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.