Struct bbolt_rs::BucketImpl
source · pub struct BucketImpl<'tx> { /* private fields */ }Expand description
Read-only Bucket
Trait Implementations§
source§impl<'tx> BucketApi<'tx> for BucketImpl<'tx>
impl<'tx> BucketApi<'tx> for BucketImpl<'tx>
source§fn cursor(&self) -> CursorImpl<'tx>
fn cursor(&self) -> CursorImpl<'tx>
Creates a cursor associated with the bucket. Read more
source§fn bucket<T: AsRef<[u8]>>(&self, name: T) -> Option<BucketImpl<'tx>>
fn bucket<T: AsRef<[u8]>>(&self, name: T) -> Option<BucketImpl<'tx>>
Retrieves a nested bucket by name. Read more
source§fn get<T: AsRef<[u8]>>(&self, key: T) -> Option<&[u8]>
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
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<()>
fn for_each<F: FnMut(&'tx [u8], Option<&'tx [u8]>) -> Result<()>>( &self, f: F ) -> Result<()>
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 moresource§fn for_each_bucket<F: FnMut(&'tx [u8]) -> Result<()>>(&self, f: F) -> Result<()>
fn for_each_bucket<F: FnMut(&'tx [u8]) -> Result<()>>(&self, f: F) -> Result<()>
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 moresource§fn stats(&self) -> BucketStats
fn stats(&self) -> BucketStats
Returns stats on a bucket. Read more
Auto Trait Implementations§
impl<'tx> Freeze for BucketImpl<'tx>
impl<'tx> !RefUnwindSafe for BucketImpl<'tx>
impl<'tx> !Send for BucketImpl<'tx>
impl<'tx> !Sync for BucketImpl<'tx>
impl<'tx> Unpin for BucketImpl<'tx>
impl<'tx> !UnwindSafe for BucketImpl<'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