Function bicoro::receive[][src]

pub fn receive<'a, I: 'a, O: 'a>() -> Coroutine<'a, I, O, I>
Expand description

Suspend this coroutine until an input arrives

The result can be bound. Eg. the below reads a int and converts it into a string

use bicoro::*;
let co :Coroutine<i32,(),i32> = receive();