Skip to main content

Select

Struct Select 

Source
pub struct Select<F1, F2> {
    future1: F1,
    future2: F2,
}

Fields§

§future1: F1§future2: F2

Trait Implementations§

Source§

impl<F1: Debug, F2: Debug> Debug for Select<F1, F2>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T1, T2, F1, F2> Future for Select<F1, F2>
where F1: Future<Output = T1>, F2: Future<Output = T2>,

Source§

type Output = Either<T1, T2>

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, F1, F2> Unpin for Select<F1, F2>
where PinnedFieldsOf<__Origin<'__pin, F1, F2>>: Unpin,

Auto Trait Implementations§

§

impl<F1, F2> Freeze for Select<F1, F2>
where F1: Freeze, F2: Freeze,

§

impl<F1, F2> RefUnwindSafe for Select<F1, F2>

§

impl<F1, F2> Send for Select<F1, F2>
where F1: Send, F2: Send,

§

impl<F1, F2> Sync for Select<F1, F2>
where F1: Sync, F2: Sync,

§

impl<F1, F2> UnsafeUnpin for Select<F1, F2>
where F1: UnsafeUnpin, F2: UnsafeUnpin,

§

impl<F1, F2> UnwindSafe for Select<F1, F2>
where F1: UnwindSafe, F2: UnwindSafe,

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<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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.