JoinAll

Struct JoinAll 

Source
pub struct JoinAll<H: Future, T: Future> {
    pub head: H,
    pub tail: T,
    pub head_res: Option<H::Output>,
    pub tail_res: Option<T::Output>,
}
Available on crate feature nano-alloc only.
Expand description

A Future that polls two sub-futures and stores their outputs.

Once both futures resolve, the outputs are returned as a tuple.

Fields§

§head: H§tail: T§head_res: Option<H::Output>§tail_res: Option<T::Output>

Implementations§

Source§

impl<H: Future, T: Future> JoinAll<H, T>

Source

pub fn new(head: H, tail: T) -> Self

Trait Implementations§

Source§

impl<H: Future, T: Future> Future for JoinAll<H, T>

Source§

type Output = (<H as Future>::Output, <T as Future>::Output)

The type of value produced on completion.
Source§

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Attempts to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
Source§

impl<'pin, H: Future, T: Future> Unpin for JoinAll<H, T>
where PinnedFieldsOf<__JoinAll<'pin, H, T>>: Unpin,

Auto Trait Implementations§

§

impl<H, T> Freeze for JoinAll<H, T>
where H: Freeze, T: Freeze, <H as Future>::Output: Freeze, <T as Future>::Output: Freeze,

§

impl<H, T> RefUnwindSafe for JoinAll<H, T>

§

impl<H, T> Send for JoinAll<H, T>
where H: Send, T: Send, <H as Future>::Output: Send, <T as Future>::Output: Send,

§

impl<H, T> Sync for JoinAll<H, T>
where H: Sync, T: Sync, <H as Future>::Output: Sync, <T as Future>::Output: Sync,

§

impl<H, T> UnwindSafe for JoinAll<H, T>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<F> FutureExt for F
where F: Future + ?Sized,

Source§

fn poll(&mut self, cx: &mut Context<'_>) -> Poll<Self::Output>
where Self: Unpin,

A convenience for calling Future::poll() on !Unpin types.
Source§

fn or<F>(self, other: F) -> Or<Self, F>
where Self: Sized, F: Future<Output = Self::Output>,

Returns the result of self or other future, preferring self if both are ready. Read more
Source§

fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
where Self: Sized + Send + 'a,

Available on crate feature alloc only.
Boxes the future and changes its type to dyn Future + Send + 'a. Read more
Source§

fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
where Self: Sized + 'a,

Available on crate feature alloc only.
Boxes the future and changes its type to dyn Future + 'a. Read more
Source§

impl<F1> FutureExt for F1
where F1: Future,

Source§

fn join<F2>(self, other: F2) -> Join2<F1, <F2 as IntoFuture>::IntoFuture>
where F1: Future, F2: IntoFuture,

Wait for both futures to complete.
Source§

fn race<T, S2>(self, other: S2) -> Race2<T, F1, <S2 as IntoFuture>::IntoFuture>
where F1: Future<Output = T>, S2: IntoFuture<Output = T>,

Wait for the first future to complete.
Source§

fn wait_until<D>( self, deadline: D, ) -> WaitUntil<Self, <D as IntoFuture>::IntoFuture>
where Self: Sized, D: IntoFuture,

Delay resolving the future until the given deadline. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F> IntoFuture for F
where F: Future,

Source§

type Output = <F as Future>::Output

The output that the future will produce on completion.
Source§

type IntoFuture = F

Which kind of future are we turning this into?
Source§

fn into_future(self) -> <F as IntoFuture>::IntoFuture

Creates a future from a value. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<F> _Timeout<'_> for F
where F: Future,

Source§

fn timeout(self, duration_ticks: u64) -> Timeout<'bemly_, Self::Output>
where Self: 'bemly_,

Available on crate feature nano-alloc only.
Wraps the future in a Timeout with the specified duration in hardware ticks.