Skip to main content

Receiving

Struct Receiving 

Source
pub struct Receiving<G, F> { /* private fields */ }

Trait Implementations§

Source§

impl<R1, R2, G, F> Generator<R1> for Receiving<G, F>
where F: FnMut(R1) -> R2, G: Generator<R2>,

Source§

type Yield = <G as Generator<R2>>::Yield

Source§

type Return = <G as Generator<R2>>::Return

Source§

fn resume( self: Pin<&mut Self>, value: R1, ) -> GeneratorState<Self::Yield, Self::Return>

Auto Trait Implementations§

§

impl<G, F> Freeze for Receiving<G, F>
where G: Freeze, F: Freeze,

§

impl<G, F> RefUnwindSafe for Receiving<G, F>

§

impl<G, F> Send for Receiving<G, F>
where G: Send, F: Send,

§

impl<G, F> Sync for Receiving<G, F>
where G: Sync, F: Sync,

§

impl<G, F> Unpin for Receiving<G, F>
where G: Unpin, F: Unpin,

§

impl<G, F> UnsafeUnpin for Receiving<G, F>
where G: UnsafeUnpin, F: UnsafeUnpin,

§

impl<G, F> UnwindSafe for Receiving<G, F>
where G: 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<G, R> GeneratorExt<R> for G
where G: Generator<R>,

Source§

fn receiving<F, U>(self, f: F) -> Receiving<Self, F>
where Self: Sized, F: FnMut(U) -> R,

Source§

fn compose<G: Generator<Self::Yield>>(self, then: G) -> Compose<Self, G>
where Self: Sized,

Source§

fn map_complete<U, F>(self, f: F) -> MapComplete<Self, F>
where Self: Sized, F: FnOnce(Self::Return) -> U,

Source§

fn map_yield<U, F>(self, f: F) -> MapYield<Self, F>
where Self: Sized, F: FnMut(Self::Yield) -> U,

Source§

fn and_then<G, F>(self, f: F) -> AndThen<Self, F, G>
where Self: Sized, G: Generator<R, Yield = Self::Yield>, F: FnOnce(Self::Return) -> G,

Source§

fn flatten(self) -> Flatten<Self, Self::Yield>
where Self: Sized, Self::Yield: Generator<R, Return = ()>,

Source§

impl<G> GeneratorIterator for G
where G: Generator<Return = ()> + Unpin,

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, 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.