Struct kaspa_database::prelude::DbSetAccess
source · 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 copy of the value. Read more
1.0.0 · source§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> RefUnwindSafe for DbSetAccess<TKey, TData>where
TData: RefUnwindSafe,
TKey: 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
TData: UnwindSafe,
TKey: UnwindSafe,
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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