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]

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 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, 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, V> StructuralPartialEq for MultiMap<K, V> where
    K: Ord + PartialEq + Clone,
    V: Ord + PartialEq + Clone
[src]

Auto Trait Implementations

impl<K, V> RefUnwindSafe for MultiMap<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for MultiMap<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for MultiMap<K, V> where
    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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.