pub struct EnvRo { /* private fields */ }
Expand description
Read-only handle for accessing environment that stores key-value databases
An environment can be opened using EnvBuilder
.
Use Env::open_db
to retrieve database handles
and Env::txn_ro
to start a read-only transaction.
It’s possible to clone the handle, in which case the environment will be closed when the last handle is dropped.
Trait Implementations
sourceimpl Env for EnvRo
impl Env for EnvRo
sourcefn max_keysize(&self) -> usize
fn max_keysize(&self) -> usize
Get maximum size of keys and duplicate data
sourcefn valid_keysize<K>(&self, key: &K) -> bool where
K: ?Sized + Storable,
fn valid_keysize<K>(&self, key: &K) -> bool where
K: ?Sized + Storable,
Checks if key or duplicate data has valid size
sourceunsafe fn open_dbs<'a, K, V, C>(
&self,
options: impl IntoIterator<IntoIter = impl Iterator<Item = &'a DbOptions<K, V, C, Option<CString>>> + ExactSizeIterator>
) -> Result<Vec<Db<K, V, C>>, Error> where
K: ?Sized + Storable,
V: ?Sized + Storable,
C: Constraint,
unsafe fn open_dbs<'a, K, V, C>(
&self,
options: impl IntoIterator<IntoIter = impl Iterator<Item = &'a DbOptions<K, V, C, Option<CString>>> + ExactSizeIterator>
) -> Result<Vec<Db<K, V, C>>, Error> where
K: ?Sized + Storable,
V: ?Sized + Storable,
C: Constraint,
Open databases in environment Read more
impl Eq for EnvRo
impl StructuralEq for EnvRo
impl StructuralPartialEq for EnvRo
Auto Trait Implementations
impl RefUnwindSafe for EnvRo
impl Send for EnvRo
impl Sync for EnvRo
impl Unpin for EnvRo
impl UnwindSafe for EnvRo
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)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more