Home
last modified time | relevance | path

Searched refs:EitherOrBoth (Results 1 – 8 of 8) sorted by relevance

/external/rust/crates/itertools/tests/
Dmerge_join.rs1 use itertools::EitherOrBoth;
8 let expected_result: Vec<EitherOrBoth<u32, u32>> = vec![]; in empty()
18 let expected_result: Vec<EitherOrBoth<u32, u32>> = vec![ in left_only()
19 EitherOrBoth::Left(1), in left_only()
20 EitherOrBoth::Left(2), in left_only()
21 EitherOrBoth::Left(3) in left_only()
32 let expected_result: Vec<EitherOrBoth<u32, u32>> = vec![ in right_only()
33 EitherOrBoth::Right(1), in right_only()
34 EitherOrBoth::Right(2), in right_only()
35 EitherOrBoth::Right(3) in right_only()
[all …]
Dzip.rs2 use itertools::EitherOrBoth::{Both, Left, Right};
Dquick.rs15 EitherOrBoth,
615 EitherOrBoth::Both(x, _) => Some(x),
616 EitherOrBoth::Left(x) => Some(x),
623 EitherOrBoth::Both(_, y) => Some(y),
624 EitherOrBoth::Right(y) => Some(y),
/external/rust/crates/itertools/src/
Deither_or_both.rs1 use crate::EitherOrBoth::*;
7 pub enum EitherOrBoth<A, B> { enum
16 impl<A, B> EitherOrBoth<A, B> { implementation
76 pub fn as_ref(&self) -> EitherOrBoth<&A, &B> { in as_ref()
85 pub fn as_mut(&mut self) -> EitherOrBoth<&mut A, &mut B> { in as_mut()
94 pub fn flip(self) -> EitherOrBoth<B, A> { in flip()
104 pub fn map_left<F, M>(self, f: F) -> EitherOrBoth<M, B> in map_left()
117 pub fn map_right<F, M>(self, f: F) -> EitherOrBoth<A, M> in map_right()
131 pub fn map_any<F, L, G, R>(self, f: F, g: G) -> EitherOrBoth<L, R> in map_any()
145 pub fn left_and_then<F, L>(self, f: F) -> EitherOrBoth<L, B> in left_and_then()
[all …]
Dzip_longest.rs5 use crate::either_or_both::EitherOrBoth;
37 type Item = EitherOrBoth<T::Item, U::Item>;
43 (Some(a), None) => Some(EitherOrBoth::Left(a)), in next()
44 (None, Some(b)) => Some(EitherOrBoth::Right(b)), in next()
45 (Some(a), Some(b)) => Some(EitherOrBoth::Both(a, b)), in next()
64 (Some(a), Some(b)) => Some(EitherOrBoth::Both(a, b)), in next_back()
66 (Some(a), None) => Some(EitherOrBoth::Left(a)), in next_back()
67 (None, Some(b)) => Some(EitherOrBoth::Right(b)), in next_back()
69 Greater => self.a.next_back().map(EitherOrBoth::Left), in next_back()
70 Less => self.b.next_back().map(EitherOrBoth::Right), in next_back()
Dmerge_join.rs6 use crate::either_or_both::EitherOrBoth;
58 type Item = EitherOrBoth<I::Item, J::Item>;
64 Some(EitherOrBoth::Left(left)), in next()
66 Some(EitherOrBoth::Right(right)), in next()
70 Some(EitherOrBoth::Both(left, right)), in next()
73 Some(EitherOrBoth::Left(left)) in next()
77 Some(EitherOrBoth::Right(right)) in next()
123 break Some(EitherOrBoth::Left( in last()
128 break Some(EitherOrBoth::Right( in last()
134 Ordering::Equal => Some(EitherOrBoth::Both(left, right)), in last()
[all …]
Dlib.rs181 pub use crate::either_or_both::EitherOrBoth;
/external/rust/crates/itertools/
DCHANGELOG.md12 - Derive `Hash` for `EitherOrBoth` (#417)
70 …- Added convenience methods to [`EitherOrBoth`](https://docs.rs/itertools/0.8.1/itertools/enum.Eit…
84 …- Add convenience methods to `EitherOrBoth`, making it more similar to `Option` and `Either` by @j…