Struct abstutil::collections::MultiMap [−][src]
pub struct MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone, { map: BTreeMap<K, BTreeSet<V>>, empty: BTreeSet<V>, }
Fields
map: BTreeMap<K, BTreeSet<V>>
empty: BTreeSet<V>
Implementations
impl<K, V> MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]
impl<K, V> MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]pub fn new() -> MultiMap<K, V>
[src]
pub fn insert(&mut self, key: K, value: V)
[src]
pub fn remove(&mut self, key: K, value: V)
[src]
pub fn get(&self, key: K) -> &BTreeSet<V>
[src]
pub fn set(&mut self, key: K, values: BTreeSet<V>)
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn borrow(&self) -> &BTreeMap<K, BTreeSet<V>>
[src]
pub fn consume(self) -> BTreeMap<K, BTreeSet<V>>
[src]
Trait Implementations
impl<K: Clone, V: Clone> Clone for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]
impl<K: Clone, V: Clone> Clone for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]impl<K, V> Default for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]
impl<K, V> Default for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]impl<K: PartialEq, V: PartialEq> PartialEq<MultiMap<K, V>> for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]
impl<K: PartialEq, V: PartialEq> PartialEq<MultiMap<K, V>> for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]impl<K, V> StructuralPartialEq for MultiMap<K, V> where
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
[src]
K: Ord + PartialEq + Clone,
V: Ord + PartialEq + Clone,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for MultiMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for MultiMap<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for MultiMap<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for MultiMap<K, V>
impl<K, V> UnwindSafe for MultiMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,