Struct futures::future::PollFn
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct PollFn<F> { /* fields omitted */ }
A future which adapts a function returning Poll
.
Created by the poll_fn
function.
Trait Implementations
impl<T, E, F> Future for PollFn<F> where
F: FnMut(&mut Context) -> Result<Async<T>, E>,
[src]
F: FnMut(&mut Context) -> Result<Async<T>, E>,
type Item = T
A successful value
type Error = E
An error
fn poll(&mut self, cx: &mut Context) -> Result<Async<T>, E>
[src]
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl<F> Debug for PollFn<F> where
F: Debug,
[src]
F: Debug,