Trait frappe::SumType2
[−]
[src]
pub trait SumType2 { type Type1; type Type2; fn from_type1(val: Self::Type1) -> Self; fn from_type2(val: Self::Type2) -> Self; fn is_type1(&self) -> bool; fn is_type2(&self) -> bool; fn into_type1(self) -> Option<Self::Type1>; fn into_type2(self) -> Option<Self::Type2>; }
Generic sum type of two elements.
It's used to provide generics over the Option
/Result
/Either
types