1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/// A recursive [`ConcurrentIter`](orx_concurrent_iter::ConcurrentIter) alias that chooses
/// the backend by crate feature flags.
///
/// The iterator starts with initial elements and can grow recursively while iterating:
/// for each yielded element `e`, `extend(&e)` is called and produced children are pushed
/// back into the shared work queue before the iteration proceeds.
///
/// # Example
///
/// ```
/// use orx_concurrent_iter::ConcurrentIter;
/// use orx_concurrent_recursive_iter::ConcurrentRecursiveIter;
///
/// let extend = |x: &usize| (*x < 5).then_some(x + 1);
/// let iter = ConcurrentRecursiveIter::new([1], extend, None, None);
///
/// let all: Vec<_> = iter.item_puller().collect();
/// assert_eq!(all, [1, 2, 3, 4, 5]);
/// ```
pub type ConcurrentRecursiveIter<I, E> =
crateConcurrentRecursiveIterCrossbeamNoStd;
/// A recursive [`ConcurrentIter`](orx_concurrent_iter::ConcurrentIter) alias that chooses
/// the backend by crate feature flags.
///
/// The iterator starts with initial elements and can grow recursively while iterating:
/// for each yielded element `e`, `extend(&e)` is called and produced children are pushed
/// back into the shared work queue before the iteration proceeds.
///
/// # Example
///
/// ```
/// use orx_concurrent_iter::ConcurrentIter;
/// use orx_concurrent_recursive_iter::ConcurrentRecursiveIter;
///
/// let extend = |x: &usize| (*x < 5).then_some(x + 1);
/// let iter = ConcurrentRecursiveIter::new([1], extend, None, None);
///
/// let all: Vec<_> = iter.item_puller().collect();
/// assert_eq!(all, [1, 2, 3, 4, 5]);
/// ```
pub type ConcurrentRecursiveIter<I, E> =
crateConcurrentRecursiveIterCrossbeamStd;