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
.
The methods for read-only access are accessible through the Env
trait
(which is implemented by EnvRo
and EnvRw
).
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. It’s also possible to create a
read-only handle from a read-write handle (EnvRw
) by invoking
Env::clone_ro
.
Trait Implementations§
source§impl Env for EnvRo
impl Env for EnvRo
source§fn max_keysize(&self) -> usize
fn max_keysize(&self) -> usize
Get maximum size of keys and duplicate data
source§fn valid_keysize<'kr, K, KRef>(&self, key: KRef) -> boolwhere
K: ?Sized + Storable + 'kr,
KRef: StorableRef<'kr, K>,
fn valid_keysize<'kr, K, KRef>(&self, key: KRef) -> boolwhere K: ?Sized + Storable + 'kr, KRef: StorableRef<'kr, K>,
Checks if key or duplicate data has valid size
source§unsafe fn open_dbs<'a, K, V, C>(
&self,
options: impl IntoIterator<IntoIter = impl Iterator<Item = &'a DbSpec<K, V, C>> + ExactSizeIterator>
) -> Result<Vec<Db<K, V, C>>>where
K: ?Sized + Storable + 'a,
V: ?Sized + Storable + 'a,
C: Constraint,
unsafe fn open_dbs<'a, K, V, C>( &self, options: impl IntoIterator<IntoIter = impl Iterator<Item = &'a DbSpec<K, V, C>> + ExactSizeIterator> ) -> Result<Vec<Db<K, V, C>>>where K: ?Sized + Storable + 'a, V: ?Sized + Storable + 'a, C: Constraint,
Open databases in environment Read more