pub struct TxImpl<'tx> { /* private fields */ }
Expand description
Read-only Transaction
Trait Implementations§
Source§impl<'tx: 'a, 'a> IntoIterator for &'a TxImpl<'tx>
impl<'tx: 'a, 'a> IntoIterator for &'a TxImpl<'tx>
Source§impl<'tx> TxApi<'tx> for TxImpl<'tx>
impl<'tx> TxApi<'tx> for TxImpl<'tx>
Source§fn size(&self) -> u64
fn size(&self) -> u64
Returns current database size in bytes as seen by this transaction. Read more
Source§fn writable(&self) -> bool
fn writable(&self) -> bool
Returns whether the transaction can perform write operations. Read more
Source§fn cursor<'a>(&'a self) -> CursorImpl<'tx, 'a>
fn cursor<'a>(&'a self) -> CursorImpl<'tx, 'a>
Creates a cursor associated with the root bucket.
All items in the cursor will return None value because all root bucket keys point to buckets. Read more
Source§fn bucket<'a, T: AsRef<[u8]>>(&'a self, name: T) -> Option<BucketImpl<'tx, 'a>>
fn bucket<'a, T: AsRef<[u8]>>(&'a self, name: T) -> Option<BucketImpl<'tx, 'a>>
Retrieves a bucket by name.
Returns None if the bucket does not exist. Read more
fn bucket_path<'a, T: AsRef<[u8]>>( &'a self, names: &[T], ) -> Option<BucketImpl<'tx, 'a>>
Source§fn for_each<'a, F: FnMut(&'a [u8], BucketImpl<'tx, 'a>) -> Result<()>>(
&self,
f: F,
) -> Result<()>where
'tx: 'a,
fn for_each<'a, F: FnMut(&'a [u8], BucketImpl<'tx, 'a>) -> Result<()>>(
&self,
f: F,
) -> Result<()>where
'tx: 'a,
👎Deprecated since 1.3.9: please use
iter_*
methods insteadExecutes a function for each key/value pair in a bucket.
Because ForEach uses a Cursor, the iteration over keys is in lexicographical order. Read more
Source§fn page(&self, id: PgId) -> Option<PageInfo>
fn page(&self, id: PgId) -> Option<PageInfo>
Returns page information for a given page number. Read more
fn iter_buckets<'a>(&'a self) -> BucketIter<'tx, 'a> ⓘ
Auto Trait Implementations§
impl<'tx> Freeze for TxImpl<'tx>
impl<'tx> !RefUnwindSafe for TxImpl<'tx>
impl<'tx> !Send for TxImpl<'tx>
impl<'tx> !Sync for TxImpl<'tx>
impl<'tx> Unpin for TxImpl<'tx>
impl<'tx> !UnwindSafe for TxImpl<'tx>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more