pub struct SelectAll<St> { /* private fields */ }
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.

Returns true if the set contains no 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.

Clears the set, removing all streams.

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (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.
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
Values yielded by the stream.
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
Returns the bounds on the remaining length of the stream. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type of successful values yielded by this future
The type of failures yielded by this future
Poll this TryStream as if it were a Stream. Read more