pub enum Either<L, R> {
Left(L),
Right(R),
}
Variants
Left(L)
Right(R)
Implementations
Trait Implementations
sourceimpl<'de, L, R> Deserialize<'de> for Either<L, R> where
L: Deserialize<'de>,
R: Deserialize<'de>,
impl<'de, L, R> Deserialize<'de> for Either<L, R> where
L: Deserialize<'de>,
R: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a, L, R> FromBorrowedStr<'a> for Either<L, R> where
L: FromBorrowedStr<'a>,
R: FromBorrowedStr<'a>,
impl<'a, L, R> FromBorrowedStr<'a> for Either<L, R> where
L: FromBorrowedStr<'a>,
R: FromBorrowedStr<'a>,
type Err = (<L as FromBorrowedStr<'a>>::Err, <R as FromBorrowedStr<'a>>::Err)
fn from_borrowed_str(s: &'a str) -> Result<Self, Self::Err>
sourceimpl<L, R> FromSqlRow for Either<L, R> where
L: FromSqlRow,
R: FromSqlRow,
impl<L, R> FromSqlRow for Either<L, R> where
L: FromSqlRow,
R: FromSqlRow,
type Out = Either<<L as FromSqlRow>::Out, <R as FromSqlRow>::Out>
fn from_sql_row(
&mut self,
row: &Row<'_>,
idx: &mut ColumnIndex
) -> Result<Self::Out>
fn from_start_of_row(&mut self, row: &Row<'_>) -> Result<Self::Out>
impl<L, R> StructuralPartialEq for Either<L, R>
Auto Trait Implementations
impl<L, R> RefUnwindSafe for Either<L, R> where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Either<L, R> where
L: Send,
R: Send,
impl<L, R> Sync for Either<L, R> where
L: Sync,
R: Sync,
impl<L, R> Unpin for Either<L, R> where
L: Unpin,
R: Unpin,
impl<L, R> UnwindSafe for Either<L, R> where
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more