Generator

Trait Generator 

Source
pub trait Generator<R = ()> {
    type Yield;
    type Return;

    // Required method
    fn resume(
        self: Pin<&mut Self>,
        arg: R,
    ) -> GeneratorState<Self::Yield, Self::Return>;
}

Required Associated Types§

Required Methods§

Source

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

Implementors§

Source§

impl<Y, R, Resume> Generator<Resume> for StackfulGenerator<'_, Y, R, Resume>

Source§

type Yield = Y

Source§

type Return = R