Enum itertools::EitherOrBoth [−][src]
pub enum EitherOrBoth<A, B> {
Both(A, B),
Left(A),
Right(B),
}Expand description
Value that either holds a single A or B, or both.
Variants
Both values are present.
Only the left value of type A is present.
Only the right value of type B is present.
Implementations
If Left, or Both, return Some with the left value, otherwise, return None.
If Right, or Both, return Some with the right value, otherwise, return None.
Converts from &EitherOrBoth<A, B> to EitherOrBoth<&A, &B>.
Converts from &mut EitherOrBoth<A, B> to EitherOrBoth<&mut A, &mut B>.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.