Struct futures_util::stream::select_all::SelectAll [−][src]
pub struct SelectAll<St> { /* fields omitted */ }
Expand description
An unbounded set of streams
This “combinator” provides the ability to maintain a set of streams and drive them all to completion.
Streams are pushed into this set and their realized values are yielded as they become ready. Streams will only be polled when they generate notifications. This allows to coordinate a large number of streams.
Note that you can create a ready-made SelectAll
via the
select_all
function in the stream
module, or you can start with an
empty set with the SelectAll::new
constructor.
Implementations
Constructs a new, empty SelectAll
The returned SelectAll
does not contain any streams and, in this
state, SelectAll::poll
will return Poll::Ready(None)
.
Returns the number of streams contained in the set.
This represents the total number of in-flight streams.
Push a stream into the set.
This function submits the given stream to the set for managing. This
function will not call poll
on the submitted stream. The caller must
ensure that SelectAll::poll
is called in order to receive task
notifications.
Returns an iterator that allows inspecting each stream in the set.
Returns an iterator that allows modifying each stream in the set.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Creates a value from an iterator. Read more
Returns true
if the stream should no longer be polled.
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