[−][src]Struct llhd::table::SecondaryTable
A secondary table that associates additional information with entries in a primary table.
Methods
impl<I, V> SecondaryTable<I, V>
[src]
impl<I: TableKey, V> SecondaryTable<I, V>
[src]
pub fn add(&mut self, key: I, value: V)
[src]
Add an entry to the table.
The user must provide the key with which the information is associated.
pub fn remove(&mut self, key: I) -> Option<V>
[src]
Remove an entry from the table.
pub fn contains(&self, key: I) -> bool
[src]
Check whether an entry exists in the table.
pub fn get(&self, key: I) -> Option<&V>
[src]
Get an entry from the table, if one exists.
pub fn get_mut(&mut self, key: I) -> Option<&mut V>
[src]
Get a mutable entry from the table, if one exists.
Trait Implementations
impl<I, V> Default for SecondaryTable<I, V>
[src]
fn default() -> SecondaryTable<I, V>
[src]
impl<I: Clone, V: Clone> Clone for SecondaryTable<I, V>
[src]
fn clone(&self) -> SecondaryTable<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 SecondaryTable<I, V>
[src]
impl<I: TableKey, V> IndexMut<I> for SecondaryTable<I, V>
[src]
Auto Trait Implementations
impl<I, V> Send for SecondaryTable<I, V> where
I: Send,
V: Send,
I: Send,
V: Send,
impl<I, V> Sync for SecondaryTable<I, V> where
I: Sync,
V: Sync,
I: Sync,
V: Sync,
Blanket Implementations
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> Into for T where
U: From<T>,
[src]
U: From<T>,
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,