Expand description
Database handle
These handles are created using DbOptions
builder, which can be passed
by (shared) reference to Env::open_db
or EnvRw::create_db
.
The type arguments K
, V
, and C
reflect the type used for keys and
values, and whether duplicate keys are allowed (C
being KeysUnique
or
KeysDuplicate
), respectively.
Operations on databases is done using the methods of the Txn
trait or
TxnRw
struct. The database handle must be passed to these methods by
(shared) reference.
Using a Db
handle in a different environment (or in an environment that
has been closed and re-opened) will cause a panic.
Trait Implementations
impl<K: ?Sized, V: ?Sized, C> Eq for Db<K, V, C>
Auto Trait Implementations
impl<K: ?Sized, V: ?Sized, C> RefUnwindSafe for Db<K, V, C> where
C: RefUnwindSafe,
impl<K: ?Sized, V: ?Sized, C> Send for Db<K, V, C> where
C: Send,
impl<K: ?Sized, V: ?Sized, C> Sync for Db<K, V, C> where
C: Sync,
impl<K: ?Sized, V: ?Sized, C> Unpin for Db<K, V, C> where
C: Unpin,
impl<K: ?Sized, V: ?Sized, C> UnwindSafe for Db<K, V, C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more