pub struct ReadOnlyDB { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl Debug for ReadOnlyDB
impl Debug for ReadOnlyDB
Source§impl Drop for ReadOnlyDB
impl Drop for ReadOnlyDB
Source§impl GetColumnFamilys for ReadOnlyDB
impl GetColumnFamilys for ReadOnlyDB
fn get_cfs(&self) -> &BTreeMap<String, ColumnFamily>
fn get_mut_cfs(&mut self) -> &mut BTreeMap<String, ColumnFamily>
Source§impl Iterate for ReadOnlyDB
impl Iterate for ReadOnlyDB
fn get_raw_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, ) -> DBRawIterator<'b>
fn get_iter<'a: 'b, 'b>( &'a self, readopts: &ReadOptions, mode: IteratorMode<'_>, ) -> DBIterator<'b> ⓘ
fn iterator_opt<'a: 'b, 'b>( &'a self, mode: IteratorMode<'_>, readopts: &ReadOptions, ) -> DBIterator<'b> ⓘ
fn iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
Source§fn full_iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
fn full_iterator<'a: 'b, 'b>(&'a self, mode: IteratorMode<'_>) -> DBIterator<'b> ⓘ
Opens an interator 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.fn prefix_iterator<'a: 'b, 'b>(&'a self, prefix: &[u8]) -> DBIterator<'b> ⓘ
fn raw_iterator<'a: 'b, 'b>(&'a self) -> DBRawIterator<'b>
Source§impl IterateCF for ReadOnlyDB
impl IterateCF for ReadOnlyDB
fn get_raw_iter_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, readopts: &ReadOptions, ) -> Result<DBRawIterator<'b>, Error>
fn get_iter_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, readopts: &ReadOptions, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
Source§fn iterator_cf_opt<'a: 'b, 'b>(
&'a self,
cf_handle: &ColumnFamily,
mode: IteratorMode<'_>,
readopts: &ReadOptions,
) -> Result<DBIterator<'b>, Error>
fn iterator_cf_opt<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, readopts: &ReadOptions, ) -> Result<DBIterator<'b>, Error>
Opens an interator using the provided ReadOptions.
This is used when you want to iterate over a specific ColumnFamily with a modified ReadOptions
fn iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
fn full_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, mode: IteratorMode<'_>, ) -> Result<DBIterator<'b>, Error>
fn prefix_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, prefix: &[u8], ) -> Result<DBIterator<'b>, Error>
fn raw_iterator_cf<'a: 'b, 'b>( &'a self, cf_handle: &ColumnFamily, ) -> Result<DBRawIterator<'b>, Error>
Source§impl Open for ReadOnlyDB
impl Open for ReadOnlyDB
Source§fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
fn open_default<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Open a database with default options.
Source§fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
fn open<P: AsRef<Path>>(opts: &Options, path: P) -> Result<Self, Error>
Open the database with the specified options.
fn open_with_descriptor<P: AsRef<Path>>( opts: &Options, path: P, descriptor: Self::Descriptor, ) -> Result<Self, Error>
Source§impl OpenCF for ReadOnlyDB
impl OpenCF for ReadOnlyDB
Source§fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
fn open_cf<P, I, N>(opts: &Options, path: P, cfs: I) -> Result<Self, Error>
Open a database with the given database options and column family names. Read more
Source§fn open_cf_descriptors<P, I>(
opts: &Options,
path: P,
cfs: I,
) -> Result<Self, Error>
fn open_cf_descriptors<P, I>( opts: &Options, path: P, cfs: I, ) -> Result<Self, Error>
Open a database with the given database options and column family descriptors.
fn open_cf_descriptors_with_descriptor<P, I>( opts: &Options, path: P, cfs: I, descriptor: Self::Descriptor, ) -> Result<Self, Error>
impl Read for ReadOnlyDB
impl Send for ReadOnlyDB
impl Sync for ReadOnlyDB
Auto Trait Implementations§
impl Freeze for ReadOnlyDB
impl RefUnwindSafe for ReadOnlyDB
impl Unpin for ReadOnlyDB
impl UnwindSafe for ReadOnlyDB
Blanket Implementations§
Source§impl<T> BatchedMultiGetCF<ReadOptions> for T
impl<T> BatchedMultiGetCF<ReadOptions> for T
fn batched_multi_get_cf_full<'a, K, I>( &self, cf: &ColumnFamily, keys: I, sorted_input: bool, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBPinnableSlice<'_>>, Error>>
fn batched_multi_get_cf<'a, K, I>( &self, cf: &ColumnFamily, keys: I, sorted_input: bool, ) -> Vec<Result<Option<DBPinnableSlice<'_>>, Error>>
fn batched_multi_get_cf_opt<'a, K, I>( &self, cf: &ColumnFamily, keys: I, sorted_input: bool, readopts: &R, ) -> Vec<Result<Option<DBPinnableSlice<'_>>, Error>>
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> CreateCheckpointObject for T
impl<T> CreateCheckpointObject for T
unsafe fn create_checkpoint_object_raw( &self, ) -> Result<*mut rocksdb_checkpoint_t, Error>
fn create_checkpoint_object(&self) -> Result<Checkpoint<'_>, Error>
Source§impl<T, R> Get<R> for Twhere
T: GetCF<R>,
impl<T, R> Get<R> for Twhere
T: GetCF<R>,
fn get_full<K>( &self, key: K, readopts: Option<&R>, ) -> Result<Option<DBVector>, Error>
Source§fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<DBVector>, Error>
fn get<K: AsRef<[u8]>>(&self, key: K) -> Result<Option<DBVector>, Error>
Return the bytes associated with a key value
fn get_opt<K: AsRef<[u8]>>( &self, key: K, readopts: &R, ) -> Result<Option<DBVector>, Error>
Source§impl<T> GetCF<ReadOptions> for T
impl<T> GetCF<ReadOptions> for T
fn get_cf_full<K>( &self, cf: Option<&ColumnFamily>, key: K, readopts: Option<&ReadOptions>, ) -> Result<Option<DBVector>, Error>
fn get_cf<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, ) -> Result<Option<DBVector>, Error>
fn get_cf_opt<K: AsRef<[u8]>>( &self, cf: &ColumnFamily, key: K, readopts: &R, ) -> Result<Option<DBVector>, Error>
Source§impl<'a, T, R> GetPinned<'a> for Twhere
T: GetPinnedCF<'a, ReadOptions = R>,
impl<'a, T, R> GetPinned<'a> for Twhere
T: GetPinnedCF<'a, ReadOptions = R>,
type ReadOptions = R
Source§fn get_pinned_full<K>(
&'a self,
key: K,
readopts: Option<<T as GetPinned<'a>>::ReadOptions>,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_full<K>( &'a self, key: K, readopts: Option<<T as GetPinned<'a>>::ReadOptions>, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
Return the value associated with a key using RocksDB’s PinnableSlice
so as to avoid unnecessary memory copy.
Source§fn get_pinned<K: AsRef<[u8]>>(
&'a self,
key: K,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned<K: AsRef<[u8]>>( &'a self, key: K, ) -> Result<Option<DBPinnableSlice<'a>>, 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§fn get_pinned_opt<K: AsRef<[u8]>>(
&'a self,
key: K,
readopts: Self::ReadOptions,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_opt<K: AsRef<[u8]>>( &'a self, key: K, readopts: Self::ReadOptions, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
Return the value associated with a key using RocksDB’s PinnableSlice
so as to avoid unnecessary memory copy.
Source§impl<'a, T> GetPinnedCF<'a> for T
impl<'a, T> GetPinnedCF<'a> for T
type ColumnFamily = &'a ColumnFamily
type ReadOptions = &'a ReadOptions
Source§fn get_pinned_cf_full<K>(
&'a self,
cf: Option<<T as GetPinnedCF<'a>>::ColumnFamily>,
key: K,
readopts: Option<<T as GetPinnedCF<'a>>::ReadOptions>,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_cf_full<K>( &'a self, cf: Option<<T as GetPinnedCF<'a>>::ColumnFamily>, key: K, readopts: Option<<T as GetPinnedCF<'a>>::ReadOptions>, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
Return the value associated with a key using RocksDB’s PinnableSlice
so as to avoid unnecessary memory copy.
Source§fn get_pinned_cf<K: AsRef<[u8]>>(
&'a self,
cf: Self::ColumnFamily,
key: K,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_cf<K: AsRef<[u8]>>( &'a self, cf: Self::ColumnFamily, key: K, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
Return the value associated with a key using RocksDB’s PinnableSlice
so as to avoid unnecessary memory copy.
Source§fn get_pinned_cf_opt<K: AsRef<[u8]>>(
&'a self,
cf: Self::ColumnFamily,
key: K,
readopts: Self::ReadOptions,
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_cf_opt<K: AsRef<[u8]>>( &'a self, cf: Self::ColumnFamily, key: K, readopts: Self::ReadOptions, ) -> Result<Option<DBPinnableSlice<'a>>, Error>
Return the value associated with a key using RocksDB’s PinnableSlice
so as to avoid unnecessary memory copy.
Source§impl<T> GetProperty for T
impl<T> GetProperty for T
Source§impl<T> GetPropertyCF for T
impl<T> GetPropertyCF for T
Source§fn property_value_cf(
&self,
cf: &ColumnFamily,
name: &str,
) -> Result<Option<String>, Error>
fn property_value_cf( &self, cf: &ColumnFamily, name: &str, ) -> Result<Option<String>, Error>
Retrieves a RocksDB property by name, for a specific column family. Read more
Source§fn property_int_value_cf(
&self,
cf: &ColumnFamily,
name: &str,
) -> Result<Option<u64>, Error>
fn property_int_value_cf( &self, cf: &ColumnFamily, name: &str, ) -> Result<Option<u64>, Error>
Retrieves a RocksDB property for a specific column family and casts it to an integer. Read more
Source§impl<T> MultiGet<ReadOptions> for T
impl<T> MultiGet<ReadOptions> for T
Source§fn multi_get_full<K, I>(
&self,
keys: I,
readopts: Option<&ReadOptions>,
) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_full<K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
Return the values associated with the given keys using read options.
fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_opt<K, I>( &self, keys: I, readopts: &R, ) -> Vec<Result<Option<DBVector>, Error>>
Source§impl<T> MultiGetCF<ReadOptions> for T
impl<T> MultiGetCF<ReadOptions> for T
Source§fn multi_get_cf_full<'a, K, I>(
&self,
keys: I,
readopts: Option<&ReadOptions>,
) -> Vec<Result<Option<DBVector>, Error>>
fn multi_get_cf_full<'a, K, I>( &self, keys: I, readopts: Option<&ReadOptions>, ) -> Vec<Result<Option<DBVector>, Error>>
Return the values associated with the given keys and column families using read options.