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>
impl<'tx, 'p> BucketApi<'tx> for BucketImpl<'tx, 'p>
Source§fn cursor<'a>(&'a self) -> CursorImpl<'tx, 'a>
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>>
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]>
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<()>
👎Deprecated since 1.3.9: please use
iter_*
methods insteadExecutes 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<()>
👎Deprecated since 1.3.9: please use
iter_*
methods insteadExecutes 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
fn iter_entries<'a>(&'a self) -> EntryIter<'tx, 'a> ⓘ
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> 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