pub struct Multiset<T, S = DeterministicHasherBuilder> { /* private fields */ }
Expand description
Multiset of values.
Implementations
sourceimpl<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]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Trait Implementations
sourceimpl<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,
sourcefn 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
sourcefn 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.
sourcefn 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
sourceimpl<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,
sourcefn from_iter<I>(iter: I) -> Multiset<T, S>where
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Multiset<T, S>where
I: IntoIterator<Item = T>,
Creates a value from an iterator. Read more
sourceimpl<T, S> Hash for Multiset<T, S>where
T: Hash,
S: BuildHasher,
impl<T, S> Hash for Multiset<T, S>where
T: Hash,
S: BuildHasher,
sourceimpl<'a, T, S> IntoIterator for &'a Multiset<T, S>
impl<'a, T, S> IntoIterator for &'a Multiset<T, S>
sourceimpl<'a, T, S> IntoIterator for &'a mut Multiset<T, S>
impl<'a, T, S> IntoIterator for &'a mut Multiset<T, S>
sourceimpl<T, S> IntoIterator for Multiset<T, S>
impl<T, S> IntoIterator for Multiset<T, S>
sourceimpl<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>,
fn into_json_meta_with(self, meta: M, vocabulary: &N) -> Meta<Value<M>, M>
sourceimpl<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>,
sourceimpl<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,
sourceimpl<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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<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
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.