Struct futures_util::stream::Select
[−]
[src]
#[must_use = "streams do nothing unless polled"]pub struct Select<S1, S2> { /* fields omitted */ }
An adapter for merging the output of two streams.
The merged stream produces items from either of the underlying streams as they become available, and the streams are polled in a round-robin fashion. Errors, however, are not merged: you get at most one error at a time.
Trait Implementations
impl<S1: Debug, S2: Debug> Debug for Select<S1, S2>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S1, S2> Stream for Select<S1, S2> where
S1: Stream,
S2: Stream<Item = S1::Item, Error = S1::Error>,
[src]
S1: Stream,
S2: Stream<Item = S1::Item, Error = S1::Error>,
type Item = S1::Item
Values yielded by the stream.
type Error = S1::Error
Errors yielded by the stream.
fn poll_next(&mut self, cx: &mut Context) -> Poll<Option<S1::Item>, S1::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