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>
Auto Trait Implementations§
impl<TKey, TData> Freeze for DbSetAccess<TKey, TData>
impl<TKey, TData> RefUnwindSafe for DbSetAccess<TKey, TData>
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> UnsafeUnpin for DbSetAccess<TKey, TData>
impl<TKey, TData> UnwindSafe for DbSetAccess<TKey, TData>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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