Struct Select

#[must_use = "futures do nothing unless you `.await` or poll them"]
pub struct Select<A, B> { /* private fields */ }

Future for the [select()] function.

Trait Implementations

impl<A, B> FusedFuture for Select<A, B> where A: Future + Unpin, B: Future + Unpin,

fn is_terminated(&self) -> bool

impl<A, B> Future for Select<A, B> where A: Future + Unpin, B: Future + Unpin,

type Output = Either<(<A as Future>::Output, B), (<B as Future>::Output, A)>;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

impl<A: Debug, B: Debug> Debug for Select<A, B>

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

impl<A: Unpin, B: Unpin> Unpin for Select<A, B>

Auto Trait Implementations

impl<A, B> Freeze for Select<A, B> where Option<(A, B)>: Freeze,

impl<A, B> RefUnwindSafe for Select<A, B> where Option<(A, B)>: RefUnwindSafe,

impl<A, B> Send for Select<A, B> where Option<(A, B)>: Send,

impl<A, B> Sync for Select<A, B> where Option<(A, B)>: Sync,

impl<A, B> UnsafeUnpin for Select<A, B> where Option<(A, B)>: UnsafeUnpin,

impl<A, B> UnwindSafe for Select<A, B> where Option<(A, B)>: UnwindSafe,

Blanket Implementations

impl<F> IntoFuture for Select<A, B> where F: Future,

type Output = <F as Future>::Output;
type IntoFuture = F;
fn into_future(self) -> <F as IntoFuture>::IntoFuture

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Select<A, B> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Select<A, B> where T: ?Sized,

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

impl<T> From<T> for Select<A, B>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for Select<A, B> where T: Future + ?Sized,

impl<T, U> Into<U> for Select<A, B> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom<U> for Select<A, B> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Select<A, B> where U: TryFrom<T>,

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