Struct BucketImpl

Source
pub struct BucketImpl<'tx: 'p, 'p> { /* private fields */ }
Expand description

Read-only Bucket

Trait Implementations§

Source§

impl<'tx, 'p> BucketApi<'tx> for BucketImpl<'tx, 'p>

Source§

fn root(&self) -> PgId

Returns the bucket’s root page id. Read more
Source§

fn writable(&self) -> bool

Returns whether the bucket is writable. Read more
Source§

fn cursor<'a>(&'a self) -> CursorImpl<'tx, 'a>

Creates a cursor associated with the bucket. Read more
Source§

fn bucket<'a, T: AsRef<[u8]>>(&'a self, name: T) -> Option<BucketImpl<'tx, 'a>>

Retrieves a nested bucket by name. Read more
Source§

fn get<T: AsRef<[u8]>>(&self, key: T) -> Option<&[u8]>

Retrieves the value for a key in the bucket. Read more
Source§

fn sequence(&self) -> u64

Returns the current integer for the bucket without incrementing it. Read more
Source§

fn for_each<F: FnMut(&'tx [u8], Option<&'tx [u8]>) -> Result<()>>( &self, f: F, ) -> Result<()>

👎Deprecated since 1.3.9: please use iter_* methods instead
Executes a function for each key/value pair in a bucket. Because this uses a crate::CursorApi, the iteration over keys is in lexicographical order. Read more
Source§

fn for_each_bucket<F: FnMut(&'tx [u8]) -> Result<()>>(&self, f: F) -> Result<()>

👎Deprecated since 1.3.9: please use iter_* methods instead
Executes a function for each bucket in a bucket. Because this function uses a crate::CursorApi, the iteration over keys is in lexicographical order. Read more
Source§

fn stats(&self) -> BucketStats

Returns stats on a bucket. Read more
Source§

fn iter_entries<'a>(&'a self) -> EntryIter<'tx, 'a>

Source§

fn iter_buckets<'a>(&'a self) -> BucketIter<'tx, 'a>

Auto Trait Implementations§

§

impl<'tx, 'p> Freeze for BucketImpl<'tx, 'p>

§

impl<'tx, 'p> !RefUnwindSafe for BucketImpl<'tx, 'p>

§

impl<'tx, 'p> !Send for BucketImpl<'tx, 'p>

§

impl<'tx, 'p> !Sync for BucketImpl<'tx, 'p>

§

impl<'tx, 'p> Unpin for BucketImpl<'tx, 'p>

§

impl<'tx, 'p> !UnwindSafe for BucketImpl<'tx, 'p>

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.