Struct SelectAll
struct SelectAll<St> { ... }
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
impl<St: Stream + Unpin> SelectAll<St>
fn new() -> SelfConstructs a new, empty
SelectAllThe returned
SelectAlldoes not contain any streams and, in this state,SelectAll::pollwill returnPoll::Ready(None).fn len(self: &Self) -> usizeReturns the number of streams contained in the set.
This represents the total number of in-flight streams.
fn is_empty(self: &Self) -> boolReturns
trueif the set contains no streamsfn push(self: &mut Self, stream: St)Push a stream into the set.
This function submits the given stream to the set for managing. This function will not call
pollon the submitted stream. The caller must ensure thatSelectAll::pollis called in order to receive task notifications.fn iter(self: &Self) -> Iter<'_, St>Returns an iterator that allows inspecting each stream in the set.
fn iter_mut(self: &mut Self) -> IterMut<'_, St>Returns an iterator that allows modifying each stream in the set.
fn clear(self: &mut Self)Clears the set, removing all streams.
impl<S> TryStreamExt for SelectAll<St>
impl<S, T, E> TryStream for SelectAll<St>
fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>
impl<St> Freeze for SelectAll<St>
impl<St> RefUnwindSafe for SelectAll<St>
impl<St> Send for SelectAll<St>
impl<St> Sync for SelectAll<St>
impl<St> Unpin for SelectAll<St>
impl<St> UnsafeUnpin for SelectAll<St>
impl<St> UnwindSafe for SelectAll<St>
impl<St: Debug> Debug for SelectAll<St>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<St: Stream + Unpin> Default for SelectAll<St>
fn default() -> Self
impl<St: Stream + Unpin> Extend for SelectAll<St>
fn extend<T: IntoIterator<Item = St>>(self: &mut Self, iter: T)
impl<St: Stream + Unpin> FromIterator for SelectAll<St>
fn from_iter<T: IntoIterator<Item = St>>(iter: T) -> Self
impl<St: Stream + Unpin> FusedStream for SelectAll<St>
fn is_terminated(self: &Self) -> bool
impl<St: Stream + Unpin> IntoIterator for SelectAll<St>
fn into_iter(self: Self) -> <Self as >::IntoIter
impl<St: Stream + Unpin> Stream for SelectAll<St>
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<<Self as >::Item>>
impl<T> Any for SelectAll<St>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SelectAll<St>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SelectAll<St>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for SelectAll<St>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> StreamExt for SelectAll<St>
impl<T, U> Into for SelectAll<St>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SelectAll<St>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SelectAll<St>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>