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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
use crateConcurrentIter;
use RangeBounds;
/// A type which can create a concurrent draining iterator over any of its sub-slices.
///
/// * Created draining iterator yields all elements of the slice defined by the `range`,
/// * Further, the slice is removed from the original collection.
///
/// If the iterator is dropped before being fully consumed, it drops the remaining removed elements.
///
/// If the complete range is provided (`..` or `0..self.len()`), self will remain empty.
///
/// # Examples
///
/// ```
/// use orx_concurrent_iter::*;
///
/// let mut v = vec![1, 2, 3];
/// let u: Vec<_> = v.con_drain(1..).item_puller().collect();
///
/// assert_eq!(v, &[1]);
/// assert_eq!(u, &[2, 3]);
/// ```