pub enum Sum2<A, B> {
A(A),
B(B),
}
Variants§
Implementations§
Trait Implementations§
source§impl<'de, A, B> Deserialize<'de> for Sum2<A, B>where
A: Deserialize<'de>,
B: Deserialize<'de>,
impl<'de, A, B> Deserialize<'de> for Sum2<A, B>where
A: Deserialize<'de>,
B: Deserialize<'de>,
source§fn 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
source§impl<A: Error, B: Error> Error for Sum2<A, B>
impl<A: Error, B: Error> Error for Sum2<A, B>
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl<A: Ord, B: Ord> Ord for Sum2<A, B>
impl<A: Ord, B: Ord> Ord for Sum2<A, B>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<A: PartialEq, B: PartialEq> PartialEq<Sum2<A, B>> for Sum2<A, B>
impl<A: PartialEq, B: PartialEq> PartialEq<Sum2<A, B>> for Sum2<A, B>
source§impl<A: PartialOrd, B: PartialOrd> PartialOrd<Sum2<A, B>> for Sum2<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd<Sum2<A, B>> for Sum2<A, B>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more