[][src]Struct ra_ap_arena::map::ArenaMap

pub struct ArenaMap<ID, V> { /* fields omitted */ }

A map from arena IDs to some other type. Space requirement is O(highest ID).

Implementations

impl<T, V> ArenaMap<Idx<T>, V>[src]

pub fn insert(&mut self, id: Idx<T>, t: V)[src]

pub fn get(&self, id: Idx<T>) -> Option<&V>[src]

pub fn get_mut(&mut self, id: Idx<T>) -> Option<&mut V>[src]

pub fn values(&self) -> impl Iterator<Item = &V>[src]

pub fn values_mut(&mut self) -> impl Iterator<Item = &mut V>[src]

pub fn iter(&self) -> impl Iterator<Item = (Idx<T>, &V)>[src]

Trait Implementations

impl<ID: Clone, V: Clone> Clone for ArenaMap<ID, V>[src]

impl<ID: Debug, V: Debug> Debug for ArenaMap<ID, V>[src]

impl<T, V> Default for ArenaMap<Idx<V>, T>[src]

impl<ID: Eq, V: Eq> Eq for ArenaMap<ID, V>[src]

impl<ID: Hash, V: Hash> Hash for ArenaMap<ID, V>[src]

impl<T, V> Index<Idx<V>> for ArenaMap<Idx<V>, T>[src]

type Output = T

The returned type after indexing.

impl<ID: Ord, V: Ord> Ord for ArenaMap<ID, V>[src]

impl<ID: PartialEq, V: PartialEq> PartialEq<ArenaMap<ID, V>> for ArenaMap<ID, V>[src]

impl<ID: PartialOrd, V: PartialOrd> PartialOrd<ArenaMap<ID, V>> for ArenaMap<ID, V>[src]

impl<ID, V> StructuralEq for ArenaMap<ID, V>[src]

impl<ID, V> StructuralPartialEq for ArenaMap<ID, V>[src]

Auto Trait Implementations

impl<ID, V> RefUnwindSafe for ArenaMap<ID, V> where
    ID: RefUnwindSafe,
    V: RefUnwindSafe

impl<ID, V> Send for ArenaMap<ID, V> where
    ID: Send,
    V: Send

impl<ID, V> Sync for ArenaMap<ID, V> where
    ID: Sync,
    V: Sync

impl<ID, V> Unpin for ArenaMap<ID, V> where
    ID: Unpin,
    V: Unpin

impl<ID, V> UnwindSafe for ArenaMap<ID, V> where
    ID: UnwindSafe,
    V: UnwindSafe

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.