pub enum Either<T, U> {
Left(T),
Right(U),
}Variants§
Implementations§
Source§impl<T, U> Either<T, U>
impl<T, U> Either<T, U>
pub fn unwrap_left(self) -> T
pub fn unwrap_right(self) -> U
Trait Implementations§
Source§impl<'de, T, U> MyDeserialize<'de> for Either<T, U>where
T: MyDeserialize<'de>,
U: MyDeserialize<'de>,
impl<'de, T, U> MyDeserialize<'de> for Either<T, U>where
T: MyDeserialize<'de>,
U: MyDeserialize<'de>,
Source§impl<T, U> MySerialize for Either<T, U>where
T: MySerialize,
U: MySerialize,
impl<T, U> MySerialize for Either<T, U>where
T: MySerialize,
U: MySerialize,
impl<T: Copy, U: Copy> Copy for Either<T, U>
impl<T: Eq, U: Eq> Eq for Either<T, U>
impl<T, U> StructuralPartialEq for Either<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for Either<T, U>
impl<T, U> RefUnwindSafe for Either<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Either<T, U>
impl<T, U> Sync for Either<T, U>
impl<T, U> Unpin for Either<T, U>
impl<T, U> UnwindSafe for Either<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more