Function allochronic_util::poll[][src]

pub fn poll<F: Future>(future: F) -> PollOnce<F>

Notable traits for PollOnce<F>

impl<F: Future> Future for PollOnce<F> type Output = Poll<F::Output>;

Polls a Future a single time, returning Poll.

Examples

use std::task::Poll;

use allochronic_util::poll;

let mut future = async { 1 };
assert_eq!(Poll::Ready(1), poll(future).await);