[−][src]Struct async_select_all::SelectAll
An unbounded set of futures.
Implementations
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.
Panics
This function will panic if the SelectAll
specified contains no items.
Trait Implementations
Auto Trait Implementations
impl<F> RefUnwindSafe for SelectAll<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for SelectAll<F> where
F: Send,
F: Send,
impl<F> Sync for SelectAll<F> where
F: Sync,
F: Sync,
impl<F> Unpin for SelectAll<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for SelectAll<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,