[−][src]Struct llhd::table::PrimaryTable
A primary table that provides dense key-based storage.
Methods
impl<I, V> PrimaryTable<I, V>
[src]
impl<I: TableKey, V> PrimaryTable<I, V>
[src]
pub fn add(&mut self, value: V) -> I
[src]
Add a new entry to the table.
Returns the key under which the entry can be accessed again.
pub fn remove(&mut self, key: I)
[src]
Remove an entry from the table.
Panics if the entry does not exist.
pub fn iter<'a>(&'a self) -> impl Iterator<Item = (I, &'a V)> + 'a
[src]
Return an iterator over the keys and values in the table.
pub fn keys<'a>(&'a self) -> impl Iterator<Item = I> + 'a
[src]
Return an iterator over the keys in the table.
pub fn values<'a>(&'a self) -> impl Iterator<Item = &'a V> + 'a
[src]
Return an iterator over the values in the table.
Trait Implementations
impl<I, V> Default for PrimaryTable<I, V>
[src]
fn default() -> PrimaryTable<I, V>
[src]
impl<I: Clone, V: Clone> Clone for PrimaryTable<I, V>
[src]
fn clone(&self) -> PrimaryTable<I, V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<I: TableKey, V> Index<I> for PrimaryTable<I, V>
[src]
impl<I: TableKey, V> IndexMut<I> for PrimaryTable<I, V>
[src]
Auto Trait Implementations
impl<I, V> Send for PrimaryTable<I, V> where
I: Send,
V: Send,
I: Send,
V: Send,
impl<I, V> Sync for PrimaryTable<I, V> where
I: Sync,
V: Sync,
I: Sync,
V: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,