[−][src]Trait genawaiter::Coroutine
A trait implemented for coroutines.
A Coroutine
is a generalization of a Generator
. A Generator
constrains
the resume argument type to ()
, but in a Coroutine
it can be anything.
Associated Types
type Yield
The type of value this generator yields.
type Resume
The type of value this generator accepts as a resume argument.
type Return
The type of value this generator returns upon completion.
Required methods
fn resume_with(
self: Pin<&mut Self>,
arg: Self::Resume
) -> GeneratorState<Self::Yield, Self::Return>
self: Pin<&mut Self>,
arg: Self::Resume
) -> GeneratorState<Self::Yield, Self::Return>
Resumes the execution of this generator.
The argument will be passed into the coroutine as a resume argument.
Implementors
impl<'s, Y, R, F: Future> Coroutine for genawaiter::stack::Gen<'s, Y, R, F>
[src]
type Yield = Y
type Resume = R
type Return = F::Output
fn resume_with(
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>
[src]
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>
impl<Y, R, F: Future> Coroutine for genawaiter::rc::Gen<Y, R, F>
[src]
type Yield = Y
type Resume = R
type Return = F::Output
fn resume_with(
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>
[src]
self: Pin<&mut Self>,
arg: R
) -> GeneratorState<Self::Yield, Self::Return>