[][src]Trait genawaiter::Generator

pub trait Generator {
    type Yield;
    type Return;
    fn resume(self: Pin<&mut Self>) -> GeneratorState<Self::Yield, Self::Return>;
}

A trait implemented for generator types.

This is modeled after the stdlib's nightly-only std::ops::Generator.

Associated Types

type Yield

The type of value this generator yields.

type Return

The type of value this generator returns upon completion.

Loading content...

Required methods

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

Resumes the execution of this generator.

Loading content...

Implementors

impl<C: Coroutine<Resume = ()>> Generator for C[src]

type Yield = Self::Yield

type Return = Self::Return

Loading content...