pub struct obj_write_txn_t { /* private fields */ }Expand description
Opaque write-transaction handle.
Holds:
inner: a'static-erasedWriteTxnborrowing from the shared env. Real lifetime is bound to the_dbkeepalive below; the erasure is sound because the two fields drop in the order declared (Rust guarantees in-declaration-order field drop) and the txn never escapes as'static._db: an Arc keepalive on the parent [obj::Db]; the env referenced byinnerlives at least as long as this Arc.
ManuallyDrop on inner lets us explicitly drop the txn (via
obj_txn_commit / obj_txn_rollback / the handle’s Drop)
before the Arc is released — order matters for soundness.
Trait Implementations§
Source§impl Drop for obj_write_txn_t
impl Drop for obj_write_txn_t
Auto Trait Implementations§
impl Freeze for obj_write_txn_t
impl RefUnwindSafe for obj_write_txn_t
impl !Send for obj_write_txn_t
impl Sync for obj_write_txn_t
impl Unpin for obj_write_txn_t
impl UnsafeUnpin for obj_write_txn_t
impl UnwindSafe for obj_write_txn_t
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