]> git.proxmox.com Git - rustc.git/blob - src/vendor/rayon/src/collections/mod.rs
New upstream version 1.25.0+dfsg1
[rustc.git] / src / vendor / rayon / src / collections / mod.rs
1 //! Parallel iterator types for [standard collections][std::collections]
2 //!
3 //! You will rarely need to interact with this module directly unless you need
4 //! to name one of the iterator types.
5 //!
6 //! [std::collections]: https://doc.rust-lang.org/stable/std/collections/
7
8 /// Convert an iterable collection into a parallel iterator by first
9 /// collecting into a temporary `Vec`, then iterating that.
10 macro_rules! into_par_vec {
11 ($t:ty => $iter:ident<$($i:tt),*>, impl $($args:tt)*) => {
12 impl $($args)* IntoParallelIterator for $t {
13 type Item = <$t as IntoIterator>::Item;
14 type Iter = $iter<$($i),*>;
15
16 fn into_par_iter(self) -> Self::Iter {
17 use std::iter::FromIterator;
18 $iter { inner: Vec::from_iter(self).into_par_iter() }
19 }
20 }
21 };
22 }
23
24 pub mod binary_heap;
25 pub mod btree_map;
26 pub mod btree_set;
27 pub mod hash_map;
28 pub mod hash_set;
29 pub mod linked_list;
30 pub mod vec_deque;