pub trait FutureExt: Future {
    fn join<'async_trait, F>(
        self,
        other: F
    ) -> Pin<Box<dyn Future<Output = (Self::Output, F::Output)> + 'async_trait>>
    where
        Self: Sized,
        F: Future,
        F: 'async_trait,
        Self: 'async_trait
, { ... } }
Expand description

Extend Stream with concurrency methods.

Provided methods

Join two differently-typed futures together.

Examples
use futures_concurrency::prelude::*;
use futures_lite::future::block_on;
use std::future;

fn main() {
    block_on(async {
        let a = future::ready(1u8);
        let b = future::ready("hello");
        assert_eq!(a.join(b).await, (1, "hello"));
    })
}

Implementors