]>
git.proxmox.com Git - rustc.git/blob - vendor/rayon/src/collections/hash_map.rs
1 //! This module contains the parallel iterator types for hash maps
2 //! (`HashMap<K, V>`). 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
::HashMap
;
6 use std
::hash
::{BuildHasher, Hash}
;
8 use crate::iter
::plumbing
::*;
13 /// Parallel iterator over a hash map
14 #[derive(Debug)] // std doesn't Clone
15 pub struct IntoIter
<K
: Hash
+ Eq
+ Send
, V
: Send
> {
16 inner
: vec
::IntoIter
<(K
, V
)>,
20 HashMap
<K
, V
, S
> => IntoIter
<K
, V
>,
21 impl<K
: Hash
+ Eq
+ Send
, V
: Send
, S
: BuildHasher
>
25 IntoIter
<K
, V
> => (K
, V
),
26 impl<K
: Hash
+ Eq
+ Send
, V
: Send
>
29 /// Parallel iterator over an immutable reference to a hash map
31 pub struct Iter
<'a
, K
: Hash
+ Eq
+ Sync
, V
: Sync
> {
32 inner
: vec
::IntoIter
<(&'a K
, &'a V
)>,
35 impl<'a
, K
: Hash
+ Eq
+ Sync
, V
: Sync
> Clone
for Iter
<'a
, K
, V
> {
36 fn clone(&self) -> Self {
38 inner
: self.inner
.clone(),
44 &'a HashMap
<K
, V
, S
> => Iter
<'a
, K
, V
>,
45 impl<'a
, K
: Hash
+ Eq
+ Sync
, V
: Sync
, S
: BuildHasher
>
49 Iter
<'a
, K
, V
> => (&'a K
, &'a V
),
50 impl<'a
, K
: Hash
+ Eq
+ Sync
+ 'a
, V
: Sync
+ 'a
>
53 /// Parallel iterator over a mutable reference to a hash map
55 pub struct IterMut
<'a
, K
: Hash
+ Eq
+ Sync
, V
: Send
> {
56 inner
: vec
::IntoIter
<(&'a K
, &'a
mut V
)>,
60 &'a
mut HashMap
<K
, V
, S
> => IterMut
<'a
, K
, V
>,
61 impl<'a
, K
: Hash
+ Eq
+ Sync
, V
: Send
, S
: BuildHasher
>
65 IterMut
<'a
, K
, V
> => (&'a K
, &'a
mut V
),
66 impl<'a
, K
: Hash
+ Eq
+ Sync
+ 'a
, V
: Send
+ 'a
>