Struct futures::stream::Once
[−]
[src]
#[must_use = "streams do nothing unless polled"]pub struct Once<T, E>(_);
A stream which emits single element and then EOF.
This stream will never block and is always ready.
Trait Implementations
impl<T, E> Stream for Once<T, E>
[src]
type Item = T
Values yielded by the stream.
type Error = E
Errors yielded by the stream.
fn poll_next(&mut self, &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
impl<T, E> Debug for Once<T, E> where
E: Debug,
T: Debug,
[src]
E: Debug,
T: Debug,