pub struct TxnEnv<F: FileBackend = FileHandle> { /* private fields */ }Expand description
Environment shared by every WriteTxn / ReadTxn in a
process. Holds the pager (behind an Arc<Mutex<_>>), the in-
process write-serialization mutex, and — for file-backed
databases — an optional FileHandle used for cross-process
byte-range locking.
TxnEnv is Send + Sync; construct one and share via Arc
across threads (or across an obj::Db whose ownership wraps it).
Implementations§
Source§impl<F: FileBackend> TxnEnv<F>
impl<F: FileBackend> TxnEnv<F>
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for TxnEnv<F>
impl<F> RefUnwindSafe for TxnEnv<F>
impl<F> Send for TxnEnv<F>where
F: Send,
impl<F> Sync for TxnEnv<F>where
F: Send,
impl<F> Unpin for TxnEnv<F>
impl<F> UnsafeUnpin for TxnEnv<F>
impl<F> UnwindSafe for TxnEnv<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more