Struct nekolib::ds::btree_multiset::BTreeMultiset
source · pub struct BTreeMultiset<K>(/* private fields */);
Expand description
多重集合。
Implementations§
source§impl<K: Ord> BTreeMultiset<K>
impl<K: Ord> BTreeMultiset<K>
pub fn new() -> Self
pub fn insert(&mut self, k: K)
pub fn insert_n(&mut self, k: K, n: usize)
pub fn remove(&mut self, k: &K)
pub fn remove_n(&mut self, k: &K, n: usize)
pub fn min(&self) -> Option<&K>
pub fn max(&self) -> Option<&K>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn count(&self, k: &K) -> usize
pub fn iter(&self) -> Iter<'_, K> ⓘ
Trait Implementations§
source§impl<K: Clone> Clone for BTreeMultiset<K>
impl<K: Clone> Clone for BTreeMultiset<K>
source§fn clone(&self) -> BTreeMultiset<K>
fn clone(&self) -> BTreeMultiset<K>
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> Debug for BTreeMultiset<K>
impl<K: Debug> Debug for BTreeMultiset<K>
source§impl<'a, K: Ord> IntoIterator for &'a BTreeMultiset<K>
impl<'a, K: Ord> IntoIterator for &'a BTreeMultiset<K>
source§impl<K: PartialEq> PartialEq<BTreeMultiset<K>> for BTreeMultiset<K>
impl<K: PartialEq> PartialEq<BTreeMultiset<K>> for BTreeMultiset<K>
source§fn eq(&self, other: &BTreeMultiset<K>) -> bool
fn eq(&self, other: &BTreeMultiset<K>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<K: Eq> Eq for BTreeMultiset<K>
impl<K> StructuralEq for BTreeMultiset<K>
impl<K> StructuralPartialEq for BTreeMultiset<K>
Auto Trait Implementations§
impl<K> RefUnwindSafe for BTreeMultiset<K>where K: RefUnwindSafe,
impl<K> Send for BTreeMultiset<K>where K: Send,
impl<K> Sync for BTreeMultiset<K>where K: Sync,
impl<K> Unpin for BTreeMultiset<K>
impl<K> UnwindSafe for BTreeMultiset<K>where K: RefUnwindSafe,
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