struct HashSet<K, H = DefaultHash> { ... }
K: Hashable<K, H> + Equatable<K>
H: Hasher<H>

A hash-based set collection.

HashSet<T> is a wrapper around HashMap<T, ()>. Elements must satisfy the Hashable and Equatable protocols.

Example

Methods

impl HashSet<K, H = DefaultHash> { ... }
K: Hashable<K, H> + Equatable<K>
H: Hasher<H>

impl HashSet<K, I, H = DefaultHash> { ... }
K: Hashable<K, H> + Equatable<K>
I: Iterator<I, K>
H: Hasher<H>

impl HashSet<B, K, H = DefaultHash> { ... }
B: Hashable<B, H> + Equatable<B>
K: Borrowable<K, B>
H: Hasher<H>