pub struct Table<K, V> { /* private fields */ }Expand description
A typed handle to one table. Cheap to construct and clone; holds only the
table name and the K/V type binding.
Implementations§
Source§impl<K, V> Table<K, V>
impl<K, V> Table<K, V>
Sourcepub fn get(&self, tx: &impl Readable, key: &K) -> StoreResult<Option<V>>
pub fn get(&self, tx: &impl Readable, key: &K) -> StoreResult<Option<V>>
Fetch the value for key, or None if absent. Accepts any Readable,
so it reads from a read transaction or a write transaction’s own
uncommitted state.
Sourcepub fn put(&self, tx: &mut impl WriteTx, key: &K, value: &V) -> StoreResult<()>
pub fn put(&self, tx: &mut impl WriteTx, key: &K, value: &V) -> StoreResult<()>
Insert or overwrite key → value.
Trait Implementations§
Auto Trait Implementations§
impl<K, V> Freeze for Table<K, V>
impl<K, V> RefUnwindSafe for Table<K, V>
impl<K, V> Send for Table<K, V>
impl<K, V> Sync for Table<K, V>
impl<K, V> Unpin for Table<K, V>
impl<K, V> UnsafeUnpin for Table<K, V>
impl<K, V> UnwindSafe for Table<K, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more