orx_concurrent_iter/implementations/vec_deque/
into_con_iter.rs

1use super::con_iter_ref::ConIterVecDequeRef;
2use crate::{IntoConcurrentIter, implementations::ConIterVec};
3use alloc::{collections::VecDeque, vec::Vec};
4
5impl<'a, T> IntoConcurrentIter for &'a VecDeque<T>
6where
7    T: Sync,
8{
9    type Item = &'a T;
10
11    type IntoIter = ConIterVecDequeRef<'a, T>;
12
13    fn into_con_iter(self) -> Self::IntoIter {
14        Self::IntoIter::new(self)
15    }
16}
17
18impl<T> IntoConcurrentIter for VecDeque<T>
19where
20    T: Send,
21{
22    type Item = T;
23
24    type IntoIter = ConIterVec<T>;
25
26    fn into_con_iter(self) -> Self::IntoIter {
27        Vec::from(self).into_con_iter()
28    }
29}