orx-concurrent-iter 3.3.0

A thread-safe and ergonomic concurrent iterator trait and efficient lock-free implementations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::con_iter::ConIterRange;
use crate::into_concurrent_iter::IntoConcurrentIter;
use core::ops::Range;

impl<T> IntoConcurrentIter for Range<T>
where
    T: Send + From<usize> + Into<usize>,
    Range<T>: Default + Clone + ExactSizeIterator<Item = T>,
{
    type Item = T;

    type IntoIter = ConIterRange<T>;

    fn into_con_iter(self) -> Self::IntoIter {
        Self::IntoIter::new(self)
    }
}