[−][src]Struct futures_util::stream::Once
#[must_use = "streams do nothing unless polled"]pub struct Once<Fut> { /* fields omitted */ }
A stream which emits single element and then EOF.
This stream will never block and is always ready.
Trait Implementations
impl<Fut: Debug> Debug for Once<Fut>
[src]
impl<Fut: Debug> Debug for Once<Fut>
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<Fut: Unpin> Unpin for Once<Fut>
[src]
impl<Fut: Unpin> Unpin for Once<Fut>
impl<Fut: Future> Stream for Once<Fut>
[src]
impl<Fut: Future> Stream for Once<Fut>
type Item = Fut::Output
Values yielded by the stream.
fn poll_next(self: PinMut<Self>, cx: &mut Context) -> Poll<Option<Fut::Output>>
[src]
fn poll_next(self: PinMut<Self>, cx: &mut Context) -> Poll<Option<Fut::Output>>
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