[−][src]Struct llhd::table::SecondaryTable
A secondary table that associates additional information with entries in a primary table.
Implementations
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: 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]
impl<I, V> Default for SecondaryTable<I, V>
[src]
fn default() -> SecondaryTable<I, V>
[src]
impl<'de, I, V> Deserialize<'de> for SecondaryTable<I, V> where
V: Deserialize<'de>,
[src]
V: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<I: TableKey, V> Index<I> for SecondaryTable<I, V>
[src]
impl<I: TableKey, V> IndexMut<I> for SecondaryTable<I, V>
[src]
impl<I, V> Serialize for SecondaryTable<I, V> where
V: Serialize,
[src]
V: Serialize,
Auto Trait Implementations
impl<I, V> RefUnwindSafe for SecondaryTable<I, V> where
I: RefUnwindSafe,
V: RefUnwindSafe,
I: RefUnwindSafe,
V: RefUnwindSafe,
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,
impl<I, V> Unpin for SecondaryTable<I, V> where
I: Unpin,
V: Unpin,
I: Unpin,
V: Unpin,
impl<I, V> UnwindSafe for SecondaryTable<I, V> where
I: UnwindSafe,
V: UnwindSafe,
I: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> 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, U> TryFrom<U> 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<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,