[][src]Macro genawaiter::yield_

macro_rules! yield_ {
    ($val:expr) => { ... };
    (@__impl => $co:expr, $value:expr) => { ... };
}

Yields a value from a generator.

This macro can only be used inside the gen! and producer! families of macros.

It will suspend execution of the function until the generator is resumed. At that time, it will evaluate to the resume argument, if given, otherwise it will evaluate to ().

Examples

See the module-level docs for examples.