pub enum TransactionProxy<'db, 'txn>where
'db: 'txn,{
Read(&'txn MdbxReadTransaction<'db>),
OwnedRead(MdbxReadTransaction<'db>),
}Expand description
A proxy object that can be either a read or a write transaction. This can be used to hide the transaction kind generic.
Variants§
Read(&'txn MdbxReadTransaction<'db>)
OwnedRead(MdbxReadTransaction<'db>)
Trait Implementations§
Source§impl<'db, 'inner> AsRef<MdbxReadTransaction<'db>> for TransactionProxy<'db, 'inner>where
'db: 'inner,
impl<'db, 'inner> AsRef<MdbxReadTransaction<'db>> for TransactionProxy<'db, 'inner>where
'db: 'inner,
Source§fn as_ref(&self) -> &MdbxReadTransaction<'db>
fn as_ref(&self) -> &MdbxReadTransaction<'db>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'db, 'inner> Deref for TransactionProxy<'db, 'inner>where
'db: 'inner,
impl<'db, 'inner> Deref for TransactionProxy<'db, 'inner>where
'db: 'inner,
Source§impl<'db, 'inner> ReadTransaction<'db> for TransactionProxy<'db, 'inner>where
'db: 'inner,
impl<'db, 'inner> ReadTransaction<'db> for TransactionProxy<'db, 'inner>where
'db: 'inner,
type Cursor<'txn, T: Table> = CursorProxy<'txn, T> where 'inner: 'txn
type DupCursor<'txn, T: DupTable> = CursorProxy<'txn, T> where 'inner: 'txn
Source§fn get<T: Table>(&self, table: &T, key: &T::Key) -> Option<T::Value>
fn get<T: Table>(&self, table: &T, key: &T::Key) -> Option<T::Value>
Gets the value at a given key.
Source§fn cursor<'txn, T: RegularTable>(&'txn self, table: &T) -> Self::Cursor<'txn, T>
fn cursor<'txn, T: RegularTable>(&'txn self, table: &T) -> Self::Cursor<'txn, T>
Creates a cursor for iterating over the table.
Auto Trait Implementations§
impl<'db, 'txn> !Freeze for TransactionProxy<'db, 'txn>
impl<'db, 'txn> !RefUnwindSafe for TransactionProxy<'db, 'txn>
impl<'db, 'txn> Send for TransactionProxy<'db, 'txn>
impl<'db, 'txn> Sync for TransactionProxy<'db, 'txn>
impl<'db, 'txn> Unpin for TransactionProxy<'db, 'txn>
impl<'db, 'txn> UnsafeUnpin for TransactionProxy<'db, 'txn>
impl<'db, 'txn> !UnwindSafe for TransactionProxy<'db, 'txn>
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