pub struct RpcSnapshot(/* private fields */);Methods from Deref<Target = OwnedSnapshot>§
Sourcepub fn db(&self) -> &Arc<DBCommon<MultiThreaded, DBWithThreadModeInner>>
pub fn db(&self) -> &Arc<DBCommon<MultiThreaded, DBWithThreadModeInner>>
Returns the underlying DB instance.
Methods from Deref<Target = SnapshotWithThreadMode<'static, DBCommon<MultiThreaded, DBWithThreadModeInner>>>§
Sourcepub fn iterator(
&self,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'a, D>
pub fn iterator( &self, mode: IteratorMode<'_>, ) -> DBIteratorWithThreadMode<'a, D>
Creates an iterator over the data in this snapshot, using the default read options.
Sourcepub fn iterator_cf(
&self,
cf_handle: &impl AsColumnFamilyRef,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'_, D>
pub fn iterator_cf( &self, cf_handle: &impl AsColumnFamilyRef, mode: IteratorMode<'_>, ) -> DBIteratorWithThreadMode<'_, D>
Creates an iterator over the data in this snapshot under the given column family, using the default read options.
Sourcepub fn iterator_opt(
&self,
mode: IteratorMode<'_>,
readopts: ReadOptions,
) -> DBIteratorWithThreadMode<'a, D>
pub fn iterator_opt( &self, mode: IteratorMode<'_>, readopts: ReadOptions, ) -> DBIteratorWithThreadMode<'a, D>
Creates an iterator over the data in this snapshot, using the given read options.
Sourcepub fn iterator_cf_opt(
&self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
mode: IteratorMode<'_>,
) -> DBIteratorWithThreadMode<'_, D>
pub fn iterator_cf_opt( &self, cf_handle: &impl AsColumnFamilyRef, readopts: ReadOptions, mode: IteratorMode<'_>, ) -> DBIteratorWithThreadMode<'_, D>
Creates an iterator over the data in this snapshot under the given column family, using the given read options.
Sourcepub fn raw_iterator(&self) -> DBRawIteratorWithThreadMode<'_, D>
pub fn raw_iterator(&self) -> DBRawIteratorWithThreadMode<'_, D>
Creates a raw iterator over the data in this snapshot, using the default read options.
Sourcepub fn raw_iterator_cf(
&self,
cf_handle: &impl AsColumnFamilyRef,
) -> DBRawIteratorWithThreadMode<'_, D>
pub fn raw_iterator_cf( &self, cf_handle: &impl AsColumnFamilyRef, ) -> DBRawIteratorWithThreadMode<'_, D>
Creates a raw iterator over the data in this snapshot under the given column family, using the default read options.
Sourcepub fn raw_iterator_opt(
&self,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'_, D>
pub fn raw_iterator_opt( &self, readopts: ReadOptions, ) -> DBRawIteratorWithThreadMode<'_, D>
Creates a raw iterator over the data in this snapshot, using the given read options.
Sourcepub fn raw_iterator_cf_opt(
&self,
cf_handle: &impl AsColumnFamilyRef,
readopts: ReadOptions,
) -> DBRawIteratorWithThreadMode<'_, D>
pub fn raw_iterator_cf_opt( &self, cf_handle: &impl AsColumnFamilyRef, readopts: ReadOptions, ) -> DBRawIteratorWithThreadMode<'_, D>
Creates a raw iterator over the data in this snapshot under the given column family, using the given read options.
Sourcepub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
pub fn get<K>(&self, key: K) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value with default read options.
Sourcepub fn get_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value and given column family with default read options.
Sourcepub fn get_opt<K>(
&self,
key: K,
readopts: ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_opt<K>( &self, key: K, readopts: ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value and given read options.
Sourcepub fn get_cf_opt<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
readopts: ReadOptions,
) -> Result<Option<Vec<u8>>, Error>
pub fn get_cf_opt<K>( &self, cf: &impl AsColumnFamilyRef, key: K, readopts: ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
Returns the bytes associated with a key value, given column family and read options.
Sourcepub fn get_pinned<K>(
&self,
key: K,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned<K>( &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.
Sourcepub fn get_pinned_cf<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_cf<K>( &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.
Sourcepub fn get_pinned_opt<K>(
&self,
key: K,
readopts: ReadOptions,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_opt<K>( &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.
Sourcepub fn get_pinned_cf_opt<K>(
&self,
cf: &impl AsColumnFamilyRef,
key: K,
readopts: ReadOptions,
) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_pinned_cf_opt<K>( &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.
Sourcepub fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<Vec<u8>>, Error>>
Returns the bytes associated with the given key values and default read options.
Sourcepub fn multi_get_cf<'b, K, I, W>(
&self,
keys_cf: I,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_cf<'b, K, I, W>( &self, keys_cf: I, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Returns the bytes associated with the given key values and default read options.
Sourcepub fn multi_get_opt<K, I>(
&self,
keys: I,
readopts: ReadOptions,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_opt<K, I>( &self, keys: I, readopts: ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Returns the bytes associated with the given key values and given read options.
Sourcepub fn multi_get_cf_opt<'b, K, I, W>(
&self,
keys_cf: I,
readopts: ReadOptions,
) -> Vec<Result<Option<Vec<u8>>, Error>>
pub fn multi_get_cf_opt<'b, K, I, W>( &self, keys_cf: I, readopts: ReadOptions, ) -> Vec<Result<Option<Vec<u8>>, Error>>
Returns the bytes associated with the given key values, given column family and read options.
Trait Implementations§
Source§impl Clone for RpcSnapshot
impl Clone for RpcSnapshot
Source§fn clone(&self) -> RpcSnapshot
fn clone(&self) -> RpcSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RpcSnapshot
impl RefUnwindSafe for RpcSnapshot
impl Send for RpcSnapshot
impl Sync for RpcSnapshot
impl Unpin for RpcSnapshot
impl UnwindSafe for RpcSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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