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<F> Debug for PollFn<F> where
F: Debug,
[src]
impl<F> Debug for PollFn<F> where
F: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<T, F> Future for PollFn<F> where
F: FnMut(&mut Context) -> Poll<T> + Unpin,
[src]
impl<T, F> Future for PollFn<F> where
F: FnMut(&mut Context) -> Poll<T> + Unpin,
type Output = T
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
The result of the Future
.
fn poll(self: PinMut<PollFn<F>>, cx: &mut Context) -> Poll<T>
[src]
fn poll(self: PinMut<PollFn<F>>, cx: &mut Context) -> Poll<T>
🔬 This is a nightly-only experimental API. (futures_api
)
futures in libcore are unstable
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more