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]
impl<F: Debug> Debug for PollFn<F>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<F> Unpin for PollFn<F>
[src]
impl<F> Unpin for PollFn<F>
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<Self>, cx: &mut Context) -> Poll<Option<T>>
[src]
fn poll_next(self: PinMut<Self>, 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