Skip to main content

Either2

Enum Either2 

Source
pub enum Either2<L, R> {
    Left(L),
    Right(R),
}
Expand description

An output of select2.

Variants§

§

Left(L)

The left future has completed first.

§

Right(R)

The right future has completed first.

Trait Implementations§

Source§

impl<L: Debug, R: Debug> Debug for Either2<L, R>

Source§

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

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

impl<L: Eq, R: Eq> Eq for Either2<L, R>

Source§

impl<L: PartialEq, R: PartialEq> PartialEq for Either2<L, R>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<L: PartialEq, R: PartialEq> StructuralPartialEq for Either2<L, R>

Auto Trait Implementations§

§

impl<L, R> Forget for Either2<L, R>

§

impl<L, R> Freeze for Either2<L, R>
where L: Freeze, R: Freeze,

§

impl<L, R> Move for Either2<L, R>

§

impl<L, R> RefUnwindSafe for Either2<L, R>

§

impl<L, R> Send for Either2<L, R>
where R: Send, L: Send,

§

impl<L, R> Sync for Either2<L, R>
where R: Sync, L: Sync,

§

impl<L, R> Unpin for Either2<L, R>
where R: Unpin, L: Unpin,

§

impl<L, R> UnsafeUnpin for Either2<L, R>
where L: UnsafeUnpin, R: UnsafeUnpin,

§

impl<L, R> UnwindSafe for Either2<L, R>
where L: UnwindSafe, R: 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<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.