1 //! Parallel iterator types for [standard collections][std::collections]
3 //! You will rarely need to interact with this module directly unless you need
4 //! to name one of the iterator types.
6 //! [std::collections]: https://doc.rust-lang.org/stable/std/collections/
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
),*>;
16 fn into_par_iter(self) -> Self::Iter
{
17 use std
::iter
::FromIterator
;
18 $iter { inner: Vec::from_iter(self).into_par_iter() }