Trait stack_vm::Table
[−]
[src]
pub trait Table {
type Item;
fn insert(&mut self, name: &str, value: Self::Item);
fn is_empty(&self) -> bool;
fn contains_key(&self, name: &str) -> bool;
fn get(&self, name: &str) -> Option<&Self::Item>;
}Table
A simple trait used for accessing table-like objects.
Associated Types
type Item
The type for items stored and retrieved from the table.
Required Methods
fn insert(&mut self, name: &str, value: Self::Item)
Insert a value into the table using a string key.
fn is_empty(&self) -> bool
Is the table empty or not?
fn contains_key(&self, name: &str) -> bool
Does the table contain the key or not?
fn get(&self, name: &str) -> Option<&Self::Item>
Retrieve a reference to a value stored in the table by key.
Implementors
impl<T> Table for ImmutableTable<T> type Item = T;impl<T> Table for MutableTable<T> type Item = T;