Expand description
A table containing key-value mappings
Implementations
sourceimpl<'db, 'txn, K: RedbKey + ?Sized, V: RedbValue + ?Sized> Table<'db, 'txn, K, V>
impl<'db, 'txn, K: RedbKey + ?Sized, V: RedbValue + ?Sized> Table<'db, 'txn, K, V>
sourcepub fn insert(
&mut self,
key: &K,
value: &V
) -> Result<Option<AccessGuard<'_, V>>, Error>
pub fn insert(
&mut self,
key: &K,
value: &V
) -> Result<Option<AccessGuard<'_, V>>, Error>
Insert mapping of the given key to the given value
Returns the old value, if the key was present in the table
Trait Implementations
sourceimpl<'db, 'txn, K: RedbKey + ?Sized, V: RedbValue + ?Sized> ReadableTable<K, V> for Table<'db, 'txn, K, V>
impl<'db, 'txn, K: RedbKey + ?Sized, V: RedbValue + ?Sized> ReadableTable<K, V> for Table<'db, 'txn, K, V>
sourcefn get(&self, key: &K) -> Result<Option<V::View<'_>>, Error>
fn get(&self, key: &K) -> Result<Option<V::View<'_>>, Error>
Returns the value corresponding to the given key
Auto Trait Implementations
impl<'db, 'txn, K, V> !RefUnwindSafe for Table<'db, 'txn, K, V>
impl<'db, 'txn, K, V> !Send for Table<'db, 'txn, K, V>
impl<'db, 'txn, K, V> !Sync for Table<'db, 'txn, K, V>
impl<'db, 'txn, K: ?Sized, V: ?Sized> Unpin for Table<'db, 'txn, K, V>where
K: Unpin,
V: Unpin,
'db: 'txn,
impl<'db, 'txn, K, V> !UnwindSafe for Table<'db, 'txn, K, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more