//! This module contains the parallel iterator types for hash sets //! (`HashSet<T>`). You will rarely need to interact with it directly //! unless you have need to name one of the iterator types.
use std::collections::HashSet; use std::hash::{BuildHasher, Hash}; use std::marker::PhantomData;
usecrate::iter::plumbing::*; usecrate::iter::*;
usecrate::vec;
/// Parallel iterator over a hash set #[derive(Debug)] // std doesn't Clone pubstruct IntoIter<T: Hash + Eq + Send> {
inner: vec::IntoIter<T>,
}
/// Parallel iterator over an immutable reference to a hash set #[derive(Debug)] pubstruct Iter<'a, T: Hash + Eq + Sync> {
inner: vec::IntoIter<&'a T>,
}
/// Draining parallel iterator that moves out of a hash set, /// but keeps the total capacity. #[derive(Debug)] pubstruct Drain<'a, T: Hash + Eq + Send> {
inner: vec::IntoIter<T>,
marker: PhantomData<&'a mut HashSet<T>>,
}
impl<'a, T: Hash + Eq + Send, S: BuildHasher> ParallelDrainFull for &'a mut HashSet<T, S> { type Iter = Drain<'a, T>; type Item = T;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.