Struct ra_ap_la_arena::ArenaMap [−][src]
pub struct ArenaMap<IDX, V> { /* fields omitted */ }
Expand description
A map from arena indexes to some other type. Space requirement is O(highest index).
Implementations
impl<T, V> ArenaMap<Idx<T>, V>
[src]
impl<T, V> ArenaMap<Idx<T>, V>
[src]pub fn insert(&mut self, idx: Idx<T>, t: V)
[src]
pub fn insert(&mut self, idx: Idx<T>, t: V)
[src]Inserts a value associated with a given arena index into the map.
pub fn get(&self, idx: Idx<T>) -> Option<&V>
[src]
pub fn get(&self, idx: Idx<T>) -> Option<&V>
[src]Returns a reference to the value associated with the provided index if it is present.
pub fn get_mut(&mut self, idx: Idx<T>) -> Option<&mut V>
[src]
pub fn get_mut(&mut self, idx: Idx<T>) -> Option<&mut V>
[src]Returns a mutable reference to the value associated with the provided index if it is present.
pub fn values(&self) -> impl Iterator<Item = &V>
[src]
pub fn values(&self) -> impl Iterator<Item = &V>
[src]Returns an iterator over the values in the map.
pub fn values_mut(&mut self) -> impl Iterator<Item = &mut V>
[src]
pub fn values_mut(&mut self) -> impl Iterator<Item = &mut V>
[src]Returns an iterator over mutable references to the values in the map.
Trait Implementations
impl<IDX: Ord, V: Ord> Ord for ArenaMap<IDX, V>
[src]
impl<IDX: Ord, V: Ord> Ord for ArenaMap<IDX, V>
[src]impl<IDX: PartialOrd, V: PartialOrd> PartialOrd<ArenaMap<IDX, V>> for ArenaMap<IDX, V>
[src]
impl<IDX: PartialOrd, V: PartialOrd> PartialOrd<ArenaMap<IDX, V>> for ArenaMap<IDX, V>
[src]fn partial_cmp(&self, other: &ArenaMap<IDX, V>) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &ArenaMap<IDX, V>) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<IDX: Eq, V: Eq> Eq for ArenaMap<IDX, V>
[src]
impl<IDX, V> StructuralEq for ArenaMap<IDX, V>
[src]
impl<IDX, V> StructuralPartialEq for ArenaMap<IDX, V>
[src]
Auto Trait Implementations
impl<IDX, V> RefUnwindSafe for ArenaMap<IDX, V> where
IDX: RefUnwindSafe,
V: RefUnwindSafe,
IDX: RefUnwindSafe,
V: RefUnwindSafe,
impl<IDX, V> Send for ArenaMap<IDX, V> where
IDX: Send,
V: Send,
IDX: Send,
V: Send,
impl<IDX, V> Sync for ArenaMap<IDX, V> where
IDX: Sync,
V: Sync,
IDX: Sync,
V: Sync,
impl<IDX, V> Unpin for ArenaMap<IDX, V> where
IDX: Unpin,
V: Unpin,
IDX: Unpin,
V: Unpin,
impl<IDX, V> UnwindSafe for ArenaMap<IDX, V> where
IDX: UnwindSafe,
V: UnwindSafe,
IDX: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more