Struct TxImpl

Source
pub struct TxImpl<'tx> { /* private fields */ }
Expand description

Read-only Transaction

Trait Implementations§

Source§

impl<'tx> Drop for TxImpl<'tx>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'tx: 'a, 'a> IntoIterator for &'a TxImpl<'tx>

Source§

type Item = (&'a [u8], BucketImpl<'tx, 'a>)

The type of the elements being iterated over.
Source§

type IntoIter = BucketIter<'tx, 'a>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'tx> TxApi<'tx> for TxImpl<'tx>

Source§

fn id(&self) -> TxId

Returns the transaction id. Read more
Source§

fn size(&self) -> u64

Returns current database size in bytes as seen by this transaction. Read more
Source§

fn writable(&self) -> bool

Returns whether the transaction can perform write operations. Read more
Source§

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 stats(&self) -> Arc<TxStats>

Retrieves a copy of the current transaction statistics.
Source§

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
Source§

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,

👎Deprecated since 1.3.9: please use iter_* methods instead
Executes 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>

Returns page information for a given page number. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'tx, T> TxCheck<'tx> for T
where T: UnsealTx<'tx>,

Source§

fn check(&self) -> Vec<String>