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]
F: Debug,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[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]
F: FnMut(&mut Context) -> Result<Async<Option<T>>, E>,
type Item = T
Values yielded by the stream.
type Error = E
Errors yielded by the stream.
fn poll_next(&mut self, cx: &mut Context) -> Result<Async<Option<T>>, E>
[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