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> Unpin for PollFn<F>
[src]
impl<F> Unpin for PollFn<F>
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> Stream for PollFn<F> where
F: FnMut(&mut Context) -> Poll<Option<T>>,
[src]
impl<T, F> Stream for PollFn<F> where
F: FnMut(&mut Context) -> Poll<Option<T>>,
type Item = T
Values yielded by the stream.
fn poll_next(self: PinMut<PollFn<F>>, cx: &mut Context) -> Poll<Option<T>>
[src]
fn poll_next(self: PinMut<PollFn<F>>, cx: &mut Context) -> Poll<Option<T>>
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