Trait rocksdb::DBAccess

pub trait DBAccess {
    // Required methods
    unsafe fn create_snapshot(&self) -> *const rocksdb_snapshot_t;
    unsafe fn release_snapshot(&self, snapshot: *const rocksdb_snapshot_t);
    unsafe fn create_iterator(
        &self,
        readopts: &ReadOptions,
    ) -> *mut rocksdb_iterator_t;
    unsafe fn create_iterator_cf(
        &self,
        cf_handle: *mut rocksdb_column_family_handle_t,
        readopts: &ReadOptions,
    ) -> *mut rocksdb_iterator_t;
    fn get_opt<K>(
        &self,
        key: K,
        readopts: &ReadOptions,
    ) -> Result<Option<Vec<u8>>, Error>
       where K: AsRef<[u8]>;
    fn get_cf_opt<K>(
        &self,
        cf: &impl AsColumnFamilyRef,
        key: K,
        readopts: &ReadOptions,
    ) -> Result<Option<Vec<u8>>, Error>
       where K: AsRef<[u8]>;
    fn get_pinned_opt<K>(
        &self,
        key: K,
        readopts: &ReadOptions,
    ) -> Result<Option<DBPinnableSlice<'_>>, Error>
       where K: AsRef<[u8]>;
    fn get_pinned_cf_opt<K>(
        &self,
        cf: &impl AsColumnFamilyRef,
        key: K,
        readopts: &ReadOptions,
    ) -> Result<Option<DBPinnableSlice<'_>>, Error>
       where K: AsRef<[u8]>;
    fn multi_get_opt<K, I>(
        &self,
        keys: I,
        readopts: &ReadOptions,
    ) -> Vec<Result<Option<Vec<u8>>, Error>>
       where K: AsRef<[u8]>,
             I: IntoIterator<Item = K>;
    fn multi_get_cf_opt<'b, K, I, W>(
        &self,
        keys_cf: I,
        readopts: &ReadOptions,
    ) -> Vec<Result<Option<Vec<u8>>, Error>>
       where K: AsRef<[u8]>,
             I: IntoIterator<Item = (&'b W, K)>,
             W: AsColumnFamilyRef + 'b;
}
Expand description

Minimal set of DB-related methods, intended to be generic over DBWithThreadMode<T>. Mainly used internally

Required Methods§

unsafe fn create_snapshot(&self) -> *const rocksdb_snapshot_t

unsafe fn release_snapshot(&self, snapshot: *const rocksdb_snapshot_t)

unsafe fn create_iterator( &self, readopts: &ReadOptions, ) -> *mut rocksdb_iterator_t

unsafe fn create_iterator_cf( &self, cf_handle: *mut rocksdb_column_family_handle_t, readopts: &ReadOptions, ) -> *mut rocksdb_iterator_t

fn get_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
where K: AsRef<[u8]>,

fn get_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
where K: AsRef<[u8]>,

fn get_pinned_opt<K>( &self, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
where K: AsRef<[u8]>,

fn get_pinned_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
where K: AsRef<[u8]>,

fn multi_get_opt<K, I>( &self, keys: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

fn multi_get_cf_opt<'b, K, I, W>( &self, keys_cf: I, readopts: &ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
where K: AsRef<[u8]>, I: IntoIterator<Item = (&'b W, K)>, W: AsColumnFamilyRef + 'b,

Object Safety§

This trait is not object safe.

Implementors§

§

impl<'db, DB> DBAccess for Transaction<'db, DB>

§

impl<T> DBAccess for TransactionDB<T>
where T: ThreadMode,

§

impl<T, D> DBAccess for DBCommon<T, D>
where T: ThreadMode, D: DBInner,