[][src]Struct async_select_all::SelectAll

pub struct SelectAll<F: Future> { /* fields omitted */ }

An unbounded set of futures.


impl<F: Future> SelectAll<F>[src]

pub fn new() -> Self[src]

Constructs a new, empty SelectAll. The returned SelectAll does not contain any futures.

pub fn len(&self) -> usize[src]

Returns the number of futures contained in the set. This represents the total number of in-flight futures.

pub fn is_empty(&self) -> bool[src]

Returns true if the set contains no futures.

pub fn push(&mut self, future: F)[src]

Push a future into the set. This function submits the given future to the set for managing. This function will not call poll on the submitted future. The caller must ensure that SelectAll::select is called in order to receive task notifications.

pub async fn select<'_>(&'_ mut self) -> F::Output[src]

Select over a list of futures.

Upon completion the item resolved will be returned.

There are no guarantees provided on the order of the list with the remaining futures. They might be swapped around, reversed, or completely random.


This function will panic if the SelectAll specified contains no items.

Trait Implementations

impl<I> From<I> for SelectAll<I::Item> where
    I: IntoIterator,
    I::Item: Future

Auto Trait Implementations

impl<F> RefUnwindSafe for SelectAll<F> where
    F: RefUnwindSafe

impl<F> Send for SelectAll<F> where
    F: Send

impl<F> Sync for SelectAll<F> where
    F: Sync

impl<F> Unpin for SelectAll<F> where
    F: Unpin

impl<F> UnwindSafe for SelectAll<F> where
    F: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.