pub struct Multiset<T, S = DeterministicHasherBuilder> { /* private fields */ }
Expand description
Multi-set of values.
Implementations§
source§impl<T, S> Multiset<T, S>
impl<T, S> Multiset<T, S>
pub fn new() -> Multiset<T, S>where S: Default,
pub fn with_capacity(cap: usize) -> Multiset<T, S>where S: Default,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains(&self, value: &T) -> boolwhere T: PartialEq<T>,
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn as_slice(&self) -> &[T]
Trait Implementations§
source§impl<T, S> Extend<T> for Multiset<T, S>where
T: Hash,
S: BuildHasher,
impl<T, S> Extend<T> for Multiset<T, S>where T: Hash, S: BuildHasher,
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, iter: I)where I: IntoIterator<Item = 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 Multiset<T, S>where
T: Hash,
S: Default + BuildHasher,
impl<T, S> FromIterator<T> for Multiset<T, S>where T: Hash, S: Default + BuildHasher,
source§impl<'a, T, S> IntoIterator for &'a Multiset<T, S>
impl<'a, T, S> IntoIterator for &'a Multiset<T, S>
source§impl<'a, T, S> IntoIterator for &'a mut Multiset<T, S>
impl<'a, T, S> IntoIterator for &'a mut Multiset<T, S>
source§impl<T, S> IntoIterator for Multiset<T, S>
impl<T, S> IntoIterator for Multiset<T, S>
source§impl<T, S, M, N> IntoJsonWithContextMeta<M, N> for Multiset<T, S>where
T: IntoJsonWithContext<M, N>,
impl<T, S, M, N> IntoJsonWithContextMeta<M, N> for Multiset<T, S>where T: IntoJsonWithContext<M, N>,
source§impl<T, U, S, P> PartialEq<Multiset<U, P>> for Multiset<T, S>where
T: PartialEq<U>,
impl<T, U, S, P> PartialEq<Multiset<U, P>> for Multiset<T, S>where T: PartialEq<U>,
source§impl<T, S> StrippedHash for Multiset<T, S>where
T: StrippedHash,
S: BuildHasher,
impl<T, S> StrippedHash for Multiset<T, S>where T: StrippedHash, S: BuildHasher,
fn stripped_hash<H>(&self, state: &mut H)where H: Hasher,
source§impl<T, U, S, P> StrippedPartialEq<Multiset<U, P>> for Multiset<T, S>where
T: StrippedPartialEq<U>,
impl<T, U, S, P> StrippedPartialEq<Multiset<U, P>> for Multiset<T, S>where T: StrippedPartialEq<U>,
fn stripped_eq(&self, other: &Multiset<U, P>) -> bool
impl<T, S> Eq for Multiset<T, S>where T: Eq,
impl<T, S> StrippedEq for Multiset<T, S>where T: StrippedEq,
Auto Trait Implementations§
impl<T, S> RefUnwindSafe for Multiset<T, S>where S: RefUnwindSafe, T: RefUnwindSafe,
impl<T, S> Send for Multiset<T, S>where S: Send, T: Send,
impl<T, S> Sync for Multiset<T, S>where S: Sync, T: Sync,
impl<T, S> Unpin for Multiset<T, S>where S: Unpin, T: Unpin,
impl<T, S> UnwindSafe for Multiset<T, S>where S: UnwindSafe, T: 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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.