Struct futures_util::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> Debug for PollFn<F>
[src]

Formats the value using the given formatter. Read more

impl<F> Unpin for PollFn<F>
[src]

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

Values yielded by the stream.

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