[][src]Module tokio01_test::task

Futures task based helpers

Example

This example will use the MockTask to set the current task on poll.

let mut task = MockTask::new();
let (tx, mut rx) = mpsc::channel(5);

tx.send(()).wait();

assert_ready_eq!(task.enter(|| rx.poll()), Some(()));

Structs

MockTask

Mock task