Skip to main content

JoinSet

Trait JoinSet 

Source
pub trait JoinSet<T>:
    Stream<Item = T>
    + Unpin
    + Send {
    // Required methods
    fn is_empty(&self) -> bool;
    fn len(&self) -> usize;
    fn push<F>(&mut self, future: F)
       where F: Future<Output = T> + Send + 'static,
             F::Output: Send;
}

Required Methods§

Source

fn is_empty(&self) -> bool

Returns whether the JoinSet is empty.

Source

fn len(&self) -> usize

Get the number of elements in JoinSet.

Source

fn push<F>(&mut self, future: F)
where F: Future<Output = T> + Send + 'static, F::Output: Send,

Pushes future to JoinSet.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§