pub struct MultiMap<K, V>{
map: BTreeMap<K, BTreeSet<V>>,
empty: BTreeSet<V>,
}
Fields§
§map: BTreeMap<K, BTreeSet<V>>
§empty: BTreeSet<V>
Implementations§
source§impl<K, V> MultiMap<K, V>
impl<K, V> MultiMap<K, V>
pub fn new() -> MultiMap<K, V>
pub fn insert(&mut self, key: K, value: V)
pub fn remove(&mut self, key: K, value: V)
pub fn get(&self, key: K) -> &BTreeSet<V>
pub fn set(&mut self, key: K, values: BTreeSet<V>)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn borrow(&self) -> &BTreeMap<K, BTreeSet<V>>
pub fn consume(self) -> BTreeMap<K, BTreeSet<V>>
Trait Implementations§
source§impl<K, V> PartialEq for MultiMap<K, V>
impl<K, V> PartialEq for MultiMap<K, V>
impl<K, V> StructuralPartialEq for MultiMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for MultiMap<K, V>
impl<K, V> RefUnwindSafe for MultiMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for MultiMap<K, V>
impl<K, V> Sync for MultiMap<K, V>
impl<K, V> Unpin for MultiMap<K, V>
impl<K, V> UnwindSafe for MultiMap<K, V>where
K: RefUnwindSafe,
V: 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