Struct speedb::DBCommon

source ·
pub struct DBCommon<T: ThreadMode, D: DBInner> { /* private fields */ }
Expand description

A helper type to implement some common methods for DBWithThreadMode and OptimisticTransactionDB.

Implementations§

source§

impl<T: ThreadMode> DBCommon<T, DBWithThreadModeInner>

Methods of DBWithThreadMode.

source

pub fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>

Opens a database with default options.

source

pub fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>

Opens the database with the specified options.

source

pub fn open_for_read_only<P: AsRef<Path>>( opts: &Options, path: P, error_if_log_file_exist: bool ) -> Result<Self, Error>

Opens the database for read only with the specified options.

source

pub fn open_as_secondary<P: AsRef<Path>>( opts: &Options, primary_path: P, secondary_path: P ) -> Result<Self, Error>

Opens the database as a secondary.

source

pub fn open_with_ttl<P: AsRef<Path>>( opts: &Options, path: P, ttl: Duration ) -> Result<Self, Error>

Opens the database with a Time to Live compaction filter.

source

pub fn open_cf_with_ttl<P, I, N>( opts: &Options, path: P, cfs: I, ttl: Duration ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens the database with a Time to Live compaction filter and column family names.

Column families opened using this function will be created with default Options.

source

pub fn open_cf_descriptors_with_ttl<P, I>( opts: &Options, path: P, cfs: I, ttl: Duration ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = ColumnFamilyDescriptor>,

Opens a database with the given database with a Time to Live compaction filter and column family descriptors.

source

pub fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens a database with the given database options and column family names.

Column families opened using this function will be created with default Options.

source

pub fn open_cf_with_opts<P, I, N>( opts: &Options, path: P, cfs: I ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = (N, Options)>, N: AsRef<str>,

Opens a database with the given database options and column family names.

Column families opened using given Options.

source

pub fn open_cf_for_read_only<P, I, N>( opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens a database for read only with the given database options and column family names.

source

pub fn open_cf_with_opts_for_read_only<P, I, N>( db_opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = (N, Options)>, N: AsRef<str>,

Opens a database for read only with the given database options and column family names.

source

pub fn open_cf_descriptors_read_only<P, I>( opts: &Options, path: P, cfs: I, error_if_log_file_exist: bool ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = ColumnFamilyDescriptor>,

Opens a database for ready only with the given database options and column family descriptors.

source

pub fn open_cf_as_secondary<P, I, N>( opts: &Options, primary_path: P, secondary_path: P, cfs: I ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens the database as a secondary with the given database options and column family names.

source

pub fn open_cf_descriptors_as_secondary<P, I>( opts: &Options, path: P, secondary_path: P, cfs: I ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = ColumnFamilyDescriptor>,

Opens the database as a secondary with the given database options and column family descriptors.

source

pub fn open_cf_descriptors<P, I>( opts: &Options, path: P, cfs: I ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = ColumnFamilyDescriptor>,

Opens a database with the given database options and column family descriptors.

source

pub fn delete_range_cf_opt<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, from: K, to: K, writeopts: &WriteOptions ) -> Result<(), Error>

Removes the database entries in the range ["from", "to") using given write options.

source

pub fn delete_range_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, from: K, to: K ) -> Result<(), Error>

Removes the database entries in the range ["from", "to") using default write options.

source

pub fn write_opt( &self, batch: WriteBatch, writeopts: &WriteOptions ) -> Result<(), Error>

source

pub fn write(&self, batch: WriteBatch) -> Result<(), Error>

source

pub fn write_without_wal(&self, batch: WriteBatch) -> Result<(), Error>

source§

impl<T: ThreadMode, D: DBInner> DBCommon<T, D>

Common methods of DBWithThreadMode and OptimisticTransactionDB.

source

pub fn list_cf<P: AsRef<Path>>( opts: &Options, path: P ) -> Result<Vec<String>, Error>

source

pub fn destroy<P: AsRef<Path>>(opts: &Options, path: P) -> Result<(), Error>

source

pub fn repair<P: AsRef<Path>>(opts: &Options, path: P) -> Result<(), Error>

source

pub fn path(&self) -> &Path

source

pub fn flush_wal(&self, sync: bool) -> Result<(), Error>

Flushes the WAL buffer. If sync is set to true, also syncs the data to disk.

source

pub fn flush_opt(&self, flushopts: &FlushOptions) -> Result<(), Error>

Flushes database memtables to SST files on the disk.

source

pub fn flush(&self) -> Result<(), Error>

Flushes database memtables to SST files on the disk using default options.

source

pub fn flush_cf_opt( &self, cf: &impl AsColumnFamilyRef, flushopts: &FlushOptions ) -> Result<(), Error>

Flushes database memtables to SST files on the disk for a given column family.

source

pub fn flush_cf(&self, cf: &impl AsColumnFamilyRef) -> Result<(), Error>

Flushes database memtables to SST files on the disk for a given column family using default options.

source

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

Return the bytes associated with a key value with read options. If you only intend to use the vector returned temporarily, consider using get_pinned_opt to avoid unnecessary memory copy.

source

pub fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<Vec<u8>>, Error>

Return the bytes associated with a key value. If you only intend to use the vector returned temporarily, consider using get_pinned to avoid unnecessary memory copy.

source

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

Return the bytes associated with a key value and the given column family with read options. If you only intend to use the vector returned temporarily, consider using get_pinned_cf_opt to avoid unnecessary memory.

source

pub fn get_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, key: K ) -> Result<Option<Vec<u8>>, Error>

Return the bytes associated with a key value and the given column family. If you only intend to use the vector returned temporarily, consider using get_pinned_cf to avoid unnecessary memory.

source

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

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy.

source

pub fn get_pinned<K: AsRef<[u8]>>( &self, key: K ) -> Result<Option<DBPinnableSlice<'_>>, Error>

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy. Similar to get_pinned_opt but leverages default options.

source

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

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy. Similar to get_pinned_opt but allows specifying ColumnFamily

source

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

Return the value associated with a key using RocksDB’s PinnableSlice so as to avoid unnecessary memory copy. Similar to get_pinned_cf_opt but leverages default options.

source

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

Return the values associated with the given keys.

source

pub 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>,

Return the values associated with the given keys using read options.

source

pub fn multi_get_cf<'a, 'b: 'a, K, I, W>( &'a self, keys: I ) -> Vec<Result<Option<Vec<u8>>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = (&'b W, K)>, W: 'b + AsColumnFamilyRef,

Return the values associated with the given keys and column families.

source

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

Return the values associated with the given keys and column families using read options.

source

pub fn batched_multi_get_cf<K, I>( &self, cf: &impl AsColumnFamilyRef, keys: I, sorted_input: bool ) -> Vec<Result<Option<DBPinnableSlice<'_>>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

Return the values associated with the given keys and the specified column family where internally the read requests are processed in batch if block-based table SST format is used. It is a more optimized version of multi_get_cf.

source

pub fn batched_multi_get_cf_opt<K, I>( &self, cf: &impl AsColumnFamilyRef, keys: I, sorted_input: bool, readopts: &ReadOptions ) -> Vec<Result<Option<DBPinnableSlice<'_>>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = K>,

Return the values associated with the given keys and the specified column family where internally the read requests are processed in batch if block-based table SST format is used. It is a more optimized version of multi_get_cf_opt.

source

pub fn key_may_exist<K: AsRef<[u8]>>(&self, key: K) -> bool

Returns false if the given key definitely doesn’t exist in the database, otherwise returns true. This function uses default ReadOptions.

source

pub fn key_may_exist_opt<K: AsRef<[u8]>>( &self, key: K, readopts: &ReadOptions ) -> bool

Returns false if the given key definitely doesn’t exist in the database, otherwise returns true.

source

pub fn key_may_exist_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, key: K ) -> bool

Returns false if the given key definitely doesn’t exist in the specified column family, otherwise returns true. This function uses default ReadOptions.

source

pub fn key_may_exist_cf_opt<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions ) -> bool

Returns false if the given key definitely doesn’t exist in the specified column family, otherwise returns true.

source

pub fn iterator<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_> ) -> DBIteratorWithThreadMode<'b, Self>

source

pub fn iterator_opt<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_>, readopts: ReadOptions ) -> DBIteratorWithThreadMode<'b, Self>

source

pub fn iterator_cf_opt<'a: 'b, 'b>( &'a self, cf_handle: &impl AsColumnFamilyRef, readopts: ReadOptions, mode: IteratorMode<'_> ) -> DBIteratorWithThreadMode<'b, Self>

Opens an iterator using the provided ReadOptions. This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions

source

pub fn full_iterator<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_> ) -> DBIteratorWithThreadMode<'b, Self>

Opens an iterator with set_total_order_seek enabled. This must be used to iterate across prefixes when set_memtable_factory has been called with a Hash-based implementation.

source

pub fn prefix_iterator<'a: 'b, 'b, P: AsRef<[u8]>>( &'a self, prefix: P ) -> DBIteratorWithThreadMode<'b, Self>

source

pub fn iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &impl AsColumnFamilyRef, mode: IteratorMode<'_> ) -> DBIteratorWithThreadMode<'b, Self>

source

pub fn full_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &impl AsColumnFamilyRef, mode: IteratorMode<'_> ) -> DBIteratorWithThreadMode<'b, Self>

source

pub fn prefix_iterator_cf<'a, P: AsRef<[u8]>>( &'a self, cf_handle: &impl AsColumnFamilyRef, prefix: P ) -> DBIteratorWithThreadMode<'a, Self>

source

pub fn raw_iterator<'a: 'b, 'b>( &'a self ) -> DBRawIteratorWithThreadMode<'b, Self>

Opens a raw iterator over the database, using the default read options

source

pub fn raw_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &impl AsColumnFamilyRef ) -> DBRawIteratorWithThreadMode<'b, Self>

Opens a raw iterator over the given column family, using the default read options

source

pub fn raw_iterator_opt<'a: 'b, 'b>( &'a self, readopts: ReadOptions ) -> DBRawIteratorWithThreadMode<'b, Self>

Opens a raw iterator over the database, using the given read options

source

pub fn raw_iterator_cf_opt<'a: 'b, 'b>( &'a self, cf_handle: &impl AsColumnFamilyRef, readopts: ReadOptions ) -> DBRawIteratorWithThreadMode<'b, Self>

Opens a raw iterator over the given column family, using the given read options

source

pub fn snapshot(&self) -> SnapshotWithThreadMode<'_, Self>

source

pub fn put_opt<K, V>( &self, key: K, value: V, writeopts: &WriteOptions ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn put_cf_opt<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, writeopts: &WriteOptions ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn merge_opt<K, V>( &self, key: K, value: V, writeopts: &WriteOptions ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn merge_cf_opt<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V, writeopts: &WriteOptions ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn delete_opt<K: AsRef<[u8]>>( &self, key: K, writeopts: &WriteOptions ) -> Result<(), Error>

source

pub fn delete_cf_opt<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, key: K, writeopts: &WriteOptions ) -> Result<(), Error>

source

pub fn put<K, V>(&self, key: K, value: V) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn put_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn merge<K, V>(&self, key: K, value: V) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn merge_cf<K, V>( &self, cf: &impl AsColumnFamilyRef, key: K, value: V ) -> Result<(), Error>where K: AsRef<[u8]>, V: AsRef<[u8]>,

source

pub fn delete<K: AsRef<[u8]>>(&self, key: K) -> Result<(), Error>

source

pub fn delete_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, key: K ) -> Result<(), Error>

source

pub fn compact_range<S: AsRef<[u8]>, E: AsRef<[u8]>>( &self, start: Option<S>, end: Option<E> )

Runs a manual compaction on the Range of keys given. This is not likely to be needed for typical usage.

source

pub fn compact_range_opt<S: AsRef<[u8]>, E: AsRef<[u8]>>( &self, start: Option<S>, end: Option<E>, opts: &CompactOptions )

Same as compact_range but with custom options.

source

pub fn compact_range_cf<S: AsRef<[u8]>, E: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, start: Option<S>, end: Option<E> )

Runs a manual compaction on the Range of keys given on the given column family. This is not likely to be needed for typical usage.

source

pub fn compact_range_cf_opt<S: AsRef<[u8]>, E: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, start: Option<S>, end: Option<E>, opts: &CompactOptions )

Same as compact_range_cf but with custom options.

source

pub fn set_options(&self, opts: &[(&str, &str)]) -> Result<(), Error>

source

pub fn set_options_cf( &self, cf: &impl AsColumnFamilyRef, opts: &[(&str, &str)] ) -> Result<(), Error>

source

pub fn property_value( &self, name: impl CStrLike ) -> Result<Option<String>, Error>

Retrieves a RocksDB property by name.

Full list of properties could be find here.

source

pub fn property_value_cf( &self, cf: &impl AsColumnFamilyRef, name: impl CStrLike ) -> Result<Option<String>, Error>

Retrieves a RocksDB property by name, for a specific column family.

Full list of properties could be find here.

source

pub fn property_int_value( &self, name: impl CStrLike ) -> Result<Option<u64>, Error>

Retrieves a RocksDB property and casts it to an integer.

Full list of properties that return int values could be find here.

source

pub fn property_int_value_cf( &self, cf: &impl AsColumnFamilyRef, name: impl CStrLike ) -> Result<Option<u64>, Error>

Retrieves a RocksDB property for a specific column family and casts it to an integer.

Full list of properties that return int values could be find here.

source

pub fn latest_sequence_number(&self) -> u64

The sequence number of the most recent transaction.

source

pub fn get_updates_since(&self, seq_number: u64) -> Result<DBWALIterator, Error>

Iterate over batches of write operations since a given sequence.

Produce an iterator that will provide the batches of write operations that have occurred since the given sequence (see latest_sequence_number()). Use the provided iterator to retrieve each (u64, WriteBatch) tuple, and then gather the individual puts and deletes using the WriteBatch::iterate() function.

Calling get_updates_since() with a sequence number that is out of bounds will return an error.

source

pub fn try_catch_up_with_primary(&self) -> Result<(), Error>

Tries to catch up with the primary by reading as much as possible from the log files.

source

pub fn ingest_external_file<P: AsRef<Path>>( &self, paths: Vec<P> ) -> Result<(), Error>

Loads a list of external SST files created with SstFileWriter into the DB with default opts

source

pub fn ingest_external_file_opts<P: AsRef<Path>>( &self, opts: &IngestExternalFileOptions, paths: Vec<P> ) -> Result<(), Error>

Loads a list of external SST files created with SstFileWriter into the DB

source

pub fn ingest_external_file_cf<P: AsRef<Path>>( &self, cf: &impl AsColumnFamilyRef, paths: Vec<P> ) -> Result<(), Error>

Loads a list of external SST files created with SstFileWriter into the DB for given Column Family with default opts

source

pub fn ingest_external_file_cf_opts<P: AsRef<Path>>( &self, cf: &impl AsColumnFamilyRef, opts: &IngestExternalFileOptions, paths: Vec<P> ) -> Result<(), Error>

Loads a list of external SST files created with SstFileWriter into the DB for given Column Family

source

pub fn live_files(&self) -> Result<Vec<LiveFile>, Error>

Returns a list of all table files with their level, start key and end key

source

pub fn delete_file_in_range<K: AsRef<[u8]>>( &self, from: K, to: K ) -> Result<(), Error>

Delete sst files whose keys are entirely in the given range.

Could leave some keys in the range which are in files which are not entirely in the range.

Note: L0 files are left regardless of whether they’re in the range.

SnapshotWithThreadModes before the delete might not see the data in the given range.

source

pub fn delete_file_in_range_cf<K: AsRef<[u8]>>( &self, cf: &impl AsColumnFamilyRef, from: K, to: K ) -> Result<(), Error>

Same as delete_file_in_range but only for specific column family

source

pub fn cancel_all_background_work(&self, wait: bool)

Request stopping background work, if wait is true wait until it’s done.

source§

impl<I: DBInner> DBCommon<SingleThreaded, I>

source

pub fn create_cf<N: AsRef<str>>( &mut self, name: N, opts: &Options ) -> Result<(), Error>

Creates column family with given name and options

source

pub fn drop_cf(&mut self, name: &str) -> Result<(), Error>

Drops the column family with the given name

source

pub fn cf_handle(&self, name: &str) -> Option<&ColumnFamily>

Returns the underlying column family handle

source§

impl<I: DBInner> DBCommon<MultiThreaded, I>

source

pub fn create_cf<N: AsRef<str>>( &self, name: N, opts: &Options ) -> Result<(), Error>

Creates column family with given name and options

source

pub fn drop_cf(&self, name: &str) -> Result<(), Error>

Drops the column family with the given name by internally locking the inner column family map. This avoids needing &mut self reference

source

pub fn cf_handle(&self, name: &str) -> Option<Arc<BoundColumnFamily<'_>>>

Returns the underlying column family handle

source§

impl<T: ThreadMode> DBCommon<T, OptimisticTransactionDBInner>

Methods of OptimisticTransactionDB.

source

pub fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>

Opens a database with default options.

source

pub fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>

Opens the database with the specified options.

source

pub fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = N>, N: AsRef<str>,

Opens a database with the given database options and column family names.

Column families opened using this function will be created with default Options.

source

pub fn open_cf_descriptors<P, I>( opts: &Options, path: P, cfs: I ) -> Result<Self, Error>where P: AsRef<Path>, I: IntoIterator<Item = ColumnFamilyDescriptor>,

Opens a database with the given database options and column family descriptors.

source

pub fn transaction(&self) -> Transaction<'_, Self>

Creates a transaction with default options.

source

pub fn transaction_opt( &self, writeopts: &WriteOptions, otxn_opts: &OptimisticTransactionOptions ) -> Transaction<'_, Self>

Creates a transaction with default options.

source

pub fn write_opt( &self, batch: WriteBatchWithTransaction<true>, writeopts: &WriteOptions ) -> Result<(), Error>

source

pub fn write(&self, batch: WriteBatchWithTransaction<true>) -> Result<(), Error>

source

pub fn write_without_wal( &self, batch: WriteBatchWithTransaction<true> ) -> Result<(), Error>

Trait Implementations§

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T: ThreadMode, I: DBInner> Debug for DBCommon<T, I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: ThreadMode, I: DBInner> Drop for DBCommon<T, I>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T: ThreadMode + Send, I: DBInner> Send for DBCommon<T, I>

source§

impl<T: ThreadMode, I: DBInner> Sync for DBCommon<T, I>

Auto Trait Implementations§

§

impl<T, D> RefUnwindSafe for DBCommon<T, D>where D: RefUnwindSafe, T: RefUnwindSafe,

§

impl<T, D> Unpin for DBCommon<T, D>where D: Unpin, T: Unpin,

§

impl<T, D> UnwindSafe for DBCommon<T, D>where D: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.