Skip to content

Commit

Permalink
Env::read_txn document possibles errors.
Browse files Browse the repository at this point in the history
Document error according to mdb_txn_begin documentation.
  • Loading branch information
Axel Viala committed Jun 30, 2023
1 parent c6179eb commit 1937b60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions heed/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,14 @@ impl Env {
}

/// Create a transaction with read-only access for use with the environment.
///
/// ## Errors
///
/// * [heed::mdb::lmdb_error::Error::Panic]: A fatal error occured ealier and the environnement must be shut down
/// * [heed::mdb::lmdb_error::Error::MapResized]: Another process wrote data beyond this [Env] mapsize and this env
/// map must be resized
/// * [heed::mdb::lmdb_error::Error::ReadersFull]: a read-only transaction was requested and the reader lock table is
/// full
pub fn read_txn(&self) -> Result<RoTxn> {
RoTxn::new(self)
}
Expand Down

0 comments on commit 1937b60

Please sign in to comment.