Struct futures::stream::PollFn [] [src]

#[must_use = "streams do nothing unless polled"]
pub struct PollFn<F> { /* fields omitted */ }

A stream which adapts a function returning Poll.

Created by the poll_fn function.

Trait Implementations

impl<F> Debug for PollFn<F> where
    F: Debug
[src]

[src]

Formats the value using the given formatter. Read more

impl<T, E, F> Stream for PollFn<F> where
    F: FnMut(&mut Context) -> Result<Async<Option<T>>, E>, 
[src]

Values yielded by the stream.

Errors yielded by the stream.

[src]

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more

Auto Trait Implementations

impl<F> Send for PollFn<F> where
    F: Send

impl<F> Sync for PollFn<F> where
    F: Sync