Function bicoro::run_step [−][src]
pub fn run_step<I, O, R>(
routine: Coroutine<'_, I, O, R>
) -> StepResult<'_, I, O, R>
Expand description
Runs a single step in the coroutine.
This returns the step result. Used to interpret/run the coroutine
use bicoro::*;
let co: Coroutine<i32,(),i32> = receive();
let sr = run_step(co);
assert!(matches!(sr, StepResult::Next(_)));