Struct futures_util::stream::Once
[−]
[src]
#[must_use = "streams do nothing unless polled"]pub struct Once<F>(_);
A stream which emits single element and then EOF.
This stream will never block and is always ready.
Trait Implementations
impl<F: Debug> Debug for Once<F>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<F: Future> Stream for Once<F>
[src]
type Item = F::Item
Values yielded by the stream.
type Error = F::Error
Errors yielded by the stream.
fn poll_next(&mut self, cx: &mut Context) -> Poll<Option<F::Item>, F::Error>
[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