pub struct VariadicCountedHashSet<K, S = RandomState>where
K: VariadicExt,{ /* private fields */ }
Expand description
HashMap keyed on Variadics of (owned value, count) pairs, allows for lookups with RefVariadics.
Implementations§
source§impl<K> VariadicCountedHashSet<K>where
K: VariadicExt,
impl<K> VariadicCountedHashSet<K>where
K: VariadicExt,
source§impl<K, S> VariadicCountedHashSet<K, S>
impl<K, S> VariadicCountedHashSet<K, S>
source§impl<K, S> VariadicCountedHashSet<K, S>where
K: VariadicExt,
impl<K, S> VariadicCountedHashSet<K, S>where
K: VariadicExt,
sourcepub fn with_hasher(hasher: S) -> Self
pub fn with_hasher(hasher: S) -> Self
allocate a new VariadicCountedHashSet with a specific hasher
sourcepub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self
pub fn with_capacity_and_hasher(capacity: usize, hasher: S) -> Self
allocate a new VariadicCountedHashSet with a specific hasher and capacity
Trait Implementations§
source§impl<K, S: Clone> Clone for VariadicCountedHashSet<K, S>where
K: VariadicExt + Clone,
impl<K, S: Clone> Clone for VariadicCountedHashSet<K, S>where
K: VariadicExt + Clone,
source§fn clone(&self) -> VariadicCountedHashSet<K, S>
fn clone(&self) -> VariadicCountedHashSet<K, S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<K> Debug for VariadicCountedHashSet<K>
impl<K> Debug for VariadicCountedHashSet<K>
source§impl<K> Default for VariadicCountedHashSet<K>where
K: VariadicExt,
impl<K> Default for VariadicCountedHashSet<K>where
K: VariadicExt,
source§impl<K, S> Extend<K> for VariadicCountedHashSet<K, S>
impl<K, S> Extend<K> for VariadicCountedHashSet<K, S>
source§fn extend<T: IntoIterator<Item = K>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = K>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<T, S> FromIterator<T> for VariadicCountedHashSet<T, S>where
T: Eq + Hash + PartialEqVariadic + Clone,
S: BuildHasher + Default,
for<'a> T::AsRefVar<'a>: Hash,
impl<T, S> FromIterator<T> for VariadicCountedHashSet<T, S>where
T: Eq + Hash + PartialEqVariadic + Clone,
S: BuildHasher + Default,
for<'a> T::AsRefVar<'a>: Hash,
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl<T> IntoIterator for VariadicCountedHashSet<T>
impl<T> IntoIterator for VariadicCountedHashSet<T>
source§impl<T, S> PartialEq for VariadicCountedHashSet<T, S>
impl<T, S> PartialEq for VariadicCountedHashSet<T, S>
source§impl<K, S> VariadicCollection for VariadicCountedHashSet<K, S>where
K: VariadicExt + PartialEqVariadic + Eq + Hash + Clone,
for<'a> K::AsRefVar<'a>: Hash,
S: BuildHasher,
impl<K, S> VariadicCollection for VariadicCountedHashSet<K, S>where
K: VariadicExt + PartialEqVariadic + Eq + Hash + Clone,
for<'a> K::AsRefVar<'a>: Hash,
S: BuildHasher,
source§fn insert(&mut self, element: K) -> bool
fn insert(&mut self, element: K) -> bool
Insert an element into the set, return true if successful
source§fn drain(&mut self) -> impl Iterator<Item = Self::Schema>
fn drain(&mut self) -> impl Iterator<Item = Self::Schema>
iterate and drain items from the set without deallocating the container
impl<K, S> VariadicMultiset for VariadicCountedHashSet<K, S>where
K: VariadicExt + PartialEqVariadic + Eq + Hash + Clone,
for<'a> K::AsRefVar<'a>: Hash,
S: BuildHasher,
Auto Trait Implementations§
impl<K, S> Freeze for VariadicCountedHashSet<K, S>where
S: Freeze,
impl<K, S> RefUnwindSafe for VariadicCountedHashSet<K, S>where
S: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, S> Send for VariadicCountedHashSet<K, S>
impl<K, S> Sync for VariadicCountedHashSet<K, S>
impl<K, S> Unpin for VariadicCountedHashSet<K, S>
impl<K, S> UnwindSafe for VariadicCountedHashSet<K, S>where
S: UnwindSafe,
K: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)