Struct lmdb::RoTransaction [−][src]
An LMDB read-only transaction.
Implementations
impl<'env> RoTransaction<'env>
[src]
pub fn reset(self) -> InactiveTransaction<'env>
[src]
Resets the read-only transaction.
Abort the transaction like Transaction::abort
, but keep the
transaction handle. InactiveTransaction::renew
may reuse the handle.
This saves allocation overhead if the process will start a new read-only
transaction soon, and also locking overhead if
EnvironmentFlags::NO_TLS
is in use. The reader table lock is released,
but the table slot stays tied to its thread or transaction. Reader locks
generally don't interfere with writers, but they keep old versions of
database pages allocated. Thus they prevent the old pages from being
reused when writers commit new data, and so under heavy load the
database size may grow much more rapidly than otherwise.
Trait Implementations
impl<'env> Debug for RoTransaction<'env>
[src]
impl<'env> Drop for RoTransaction<'env>
[src]
impl<'env> Transaction for RoTransaction<'env>
[src]
fn txn(&self) -> *mut MDB_txn
[src]
fn commit(self) -> Result<()>
[src]
fn abort(self)
[src]
unsafe fn open_db(&self, name: Option<&str>) -> Result<Database>
[src]
fn get<'txn, K>(&'txn self, database: Database, key: &K) -> Result<&'txn [u8]> where
K: AsRef<[u8]>,
[src]
K: AsRef<[u8]>,
fn open_ro_cursor<'txn>(&'txn self, db: Database) -> Result<RoCursor<'txn>>
[src]
fn db_flags(&self, db: Database) -> Result<DatabaseFlags>
[src]
Auto Trait Implementations
impl<'env> RefUnwindSafe for RoTransaction<'env>
[src]
impl<'env> !Send for RoTransaction<'env>
[src]
impl<'env> !Sync for RoTransaction<'env>
[src]
impl<'env> Unpin for RoTransaction<'env>
[src]
impl<'env> UnwindSafe for RoTransaction<'env>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,