pub struct DbSetAccess<TKey, TData>{ /* private fields */ }Expand description
A concurrent DB store for typed set access without caching.
Implementations§
Source§impl<TKey, TData> DbSetAccess<TKey, TData>
impl<TKey, TData> DbSetAccess<TKey, TData>
pub fn new(db: Arc<DB>, prefix: Vec<u8>) -> Self
pub fn write( &self, writer: impl DbWriter, key: TKey, data: TData, ) -> Result<(), StoreError>
pub fn delete_bucket( &self, writer: impl DbWriter, key: TKey, ) -> Result<(), StoreError>
pub fn delete( &self, writer: impl DbWriter, key: TKey, data: TData, ) -> Result<(), StoreError>
pub fn prefix(&self) -> &[u8] ⓘ
pub fn bucket_iterator( &self, key: TKey, ) -> impl Iterator<Item = Result<TData, StoreError>> + '_
Trait Implementations§
Source§impl<TKey, TData> Clone for DbSetAccess<TKey, TData>
impl<TKey, TData> Clone for DbSetAccess<TKey, TData>
Source§fn clone(&self) -> DbSetAccess<TKey, TData>
fn clone(&self) -> DbSetAccess<TKey, TData>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<TKey, TData> Freeze for DbSetAccess<TKey, TData>
impl<TKey, TData> RefUnwindSafe for DbSetAccess<TKey, TData>where
TKey: RefUnwindSafe,
TData: RefUnwindSafe,
impl<TKey, TData> Send for DbSetAccess<TKey, TData>
impl<TKey, TData> Sync for DbSetAccess<TKey, TData>
impl<TKey, TData> Unpin for DbSetAccess<TKey, TData>
impl<TKey, TData> UnwindSafe for DbSetAccess<TKey, TData>where
TKey: UnwindSafe,
TData: UnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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