Struct futures::stream::Once [−][src]
#[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> Unpin for Once<Fut> where
Fut: Unpin,
[src]
impl<Fut> Unpin for Once<Fut> where
Fut: Unpin,
impl<Fut> Debug for Once<Fut> where
Fut: Debug,
[src]
impl<Fut> Debug for Once<Fut> where
Fut: 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<Fut> Stream for Once<Fut> where
Fut: Future,
[src]
impl<Fut> Stream for Once<Fut> where
Fut: Future,
type Item = <Fut as Future>::Output
Values yielded by the stream.
fn poll_next(
self: PinMut<Once<Fut>>,
cx: &mut Context
) -> Poll<Option<<Fut as Future>::Output>>
[src]
fn poll_next(
self: PinMut<Once<Fut>>,
cx: &mut Context
) -> Poll<Option<<Fut as Future>::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