]>
git.proxmox.com Git - rustc.git/blob - vendor/rayon/src/collections/hash_set.rs
1 //! This module contains the parallel iterator types for hash sets
2 //! (`HashSet<T>`). You will rarely need to interact with it directly
3 //! unless you have need to name one of the iterator types.
5 use std
::collections
::HashSet
;
6 use std
::hash
::{BuildHasher, Hash}
;
8 use crate::iter
::plumbing
::*;
13 /// Parallel iterator over a hash set
14 #[derive(Debug)] // std doesn't Clone
15 pub struct IntoIter
<T
: Hash
+ Eq
+ Send
> {
16 inner
: vec
::IntoIter
<T
>,
20 HashSet
<T
, S
> => IntoIter
<T
>,
21 impl<T
: Hash
+ Eq
+ Send
, S
: BuildHasher
>
26 impl<T
: Hash
+ Eq
+ Send
>
29 /// Parallel iterator over an immutable reference to a hash set
31 pub struct Iter
<'a
, T
: Hash
+ Eq
+ Sync
> {
32 inner
: vec
::IntoIter
<&'a T
>,
35 impl<'a
, T
: Hash
+ Eq
+ Sync
> Clone
for Iter
<'a
, T
> {
36 fn clone(&self) -> Self {
38 inner
: self.inner
.clone(),
44 &'a HashSet
<T
, S
> => Iter
<'a
, T
>,
45 impl<'a
, T
: Hash
+ Eq
+ Sync
, S
: BuildHasher
>
50 impl<'a
, T
: Hash
+ Eq
+ Sync
+ 'a
>
53 // `HashSet` doesn't have a mutable `Iterator`