use std::collections::{BinaryHeap, VecDeque};
use std::hash::{BuildHasher, Hash};
-/// Create an empty default collection and extend it.
+/// Creates an empty default collection and extends it.
fn collect_extended<C, I>(par_iter: I) -> C
where
I: IntoParallelIterator,
collection
}
-/// Collect items from a parallel iterator into a vector.
+/// Collects items from a parallel iterator into a vector.
impl<T> FromParallelIterator<T> for Vec<T>
where
T: Send,
}
}
-/// Collect items from a parallel iterator into a vecdeque.
+/// Collects items from a parallel iterator into a vecdeque.
impl<T> FromParallelIterator<T> for VecDeque<T>
where
T: Send,
}
}
-/// Collect items from a parallel iterator into a binaryheap.
+/// Collects items from a parallel iterator into a binaryheap.
/// The heap-ordering is calculated serially after all items are collected.
impl<T> FromParallelIterator<T> for BinaryHeap<T>
where
}
}
-/// Collect items from a parallel iterator into a freshly allocated
+/// Collects items from a parallel iterator into a freshly allocated
/// linked list.
impl<T> FromParallelIterator<T> for LinkedList<T>
where
}
}
-/// Collect (key, value) pairs from a parallel iterator into a
+/// Collects (key, value) pairs from a parallel iterator into a
/// hashmap. If multiple pairs correspond to the same key, then the
/// ones produced earlier in the parallel iterator will be
/// overwritten, just as with a sequential iterator.
}
}
-/// Collect (key, value) pairs from a parallel iterator into a
+/// Collects (key, value) pairs from a parallel iterator into a
/// btreemap. If multiple pairs correspond to the same key, then the
/// ones produced earlier in the parallel iterator will be
/// overwritten, just as with a sequential iterator.
}
}
-/// Collect values from a parallel iterator into a hashset.
+/// Collects values from a parallel iterator into a hashset.
impl<V, S> FromParallelIterator<V> for HashSet<V, S>
where
V: Eq + Hash + Send,
}
}
-/// Collect values from a parallel iterator into a btreeset.
+/// Collects values from a parallel iterator into a btreeset.
impl<V> FromParallelIterator<V> for BTreeSet<V>
where
V: Send + Ord,
}
}
-/// Collect characters from a parallel iterator into a string.
+/// Collects characters from a parallel iterator into a string.
impl FromParallelIterator<char> for String {
fn from_par_iter<I>(par_iter: I) -> Self
where
}
}
-/// Collect characters from a parallel iterator into a string.
+/// Collects characters from a parallel iterator into a string.
impl<'a> FromParallelIterator<&'a char> for String {
fn from_par_iter<I>(par_iter: I) -> Self
where
}
}
-/// Collect string slices from a parallel iterator into a string.
+/// Collects string slices from a parallel iterator into a string.
impl<'a> FromParallelIterator<&'a str> for String {
fn from_par_iter<I>(par_iter: I) -> Self
where
}
}
-/// Collect strings from a parallel iterator into one large string.
+/// Collects strings from a parallel iterator into one large string.
impl FromParallelIterator<String> for String {
fn from_par_iter<I>(par_iter: I) -> Self
where
}
}
-/// Collect string slices from a parallel iterator into a string.
+/// Collects string slices from a parallel iterator into a string.
impl<'a> FromParallelIterator<Cow<'a, str>> for String {
fn from_par_iter<I>(par_iter: I) -> Self
where
}
}
-/// Collect an arbitrary `Cow` collection.
+/// Collects an arbitrary `Cow` collection.
///
/// Note, the standard library only has `FromIterator` for `Cow<'a, str>` and
/// `Cow<'a, [T]>`, because no one thought to add a blanket implementation