Struct ckb_rocksdb::TransactionSnapshot
source · pub struct TransactionSnapshot<'a, T> { /* private fields */ }
Trait Implementations§
source§impl<'a, T> ConstHandle<rocksdb_snapshot_t> for TransactionSnapshot<'a, T>
impl<'a, T> ConstHandle<rocksdb_snapshot_t> for TransactionSnapshot<'a, T>
fn const_handle(&self) -> *const rocksdb_snapshot_t
source§impl<'a, T> Drop for TransactionSnapshot<'a, T>
impl<'a, T> Drop for TransactionSnapshot<'a, T>
source§impl<'a, T> GetCF<ReadOptions> for TransactionSnapshot<'a, T>where
Transaction<'a, T>: GetCF<ReadOptions>,
impl<'a, T> GetCF<ReadOptions> for TransactionSnapshot<'a, T>where Transaction<'a, T>: GetCF<ReadOptions>,
fn get_cf_full<K: AsRef<[u8]>>( &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> GetPinnedCF<'a> for TransactionSnapshot<'a, T>
impl<'a, T> GetPinnedCF<'a> for TransactionSnapshot<'a, T>
type ColumnFamily = &'a ColumnFamily
type ReadOptions = &'a ReadOptions
source§fn get_pinned_cf_full<K: AsRef<[u8]>>(
&'a self,
cf: Option<Self::ColumnFamily>,
key: K,
readopts: Option<Self::ReadOptions>
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_cf_full<K: AsRef<[u8]>>( &'a self, cf: Option<Self::ColumnFamily>, key: K, readopts: Option<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§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: Iterate> Iterate for TransactionSnapshot<'_, T>
impl<T: Iterate> Iterate for TransactionSnapshot<'_, T>
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<T: IterateCF> IterateCF for TransactionSnapshot<'_, T>
impl<T: IterateCF> IterateCF for TransactionSnapshot<'_, T>
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<'a, T> MultiGet<ReadOptions> for TransactionSnapshot<'a, T>where
Transaction<'a, T>: MultiGet<ReadOptions>,
impl<'a, T> MultiGet<ReadOptions> for TransactionSnapshot<'a, T>where Transaction<'a, T>: MultiGet<ReadOptions>,
fn multi_get_full<K, I>( &self, keys: I, readopts: Option<&ReadOptions> ) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = K>,
fn multi_get<K, I>(&self, keys: I) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = K>,
fn multi_get_opt<K, I>( &self, keys: I, readopts: &R ) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = K>,
source§impl<'a, T> MultiGetCF<ReadOptions> for TransactionSnapshot<'a, T>where
Transaction<'a, T>: MultiGet<ReadOptions>,
impl<'a, T> MultiGetCF<ReadOptions> for TransactionSnapshot<'a, T>where Transaction<'a, T>: MultiGet<ReadOptions>,
fn multi_get_cf_full<'m, K, I>( &self, keys: I, readopts: Option<&ReadOptions> ) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = (&'m ColumnFamily, K)>,
fn multi_get_cf<'a, K, I>( &self, keys_cf: I ) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = (&'a ColumnFamily, K)>,
fn multi_get_cf_opt<'a, K, I>( &self, keys_cf: I, readopts: &R ) -> Vec<Result<Option<DBVector>, Error>>where K: AsRef<[u8]>, I: IntoIterator<Item = (&'a ColumnFamily, K)>,
impl<'a, T> Read for TransactionSnapshot<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for TransactionSnapshot<'a, T>where T: RefUnwindSafe,
impl<'a, T> !Send for TransactionSnapshot<'a, T>
impl<'a, T> !Sync for TransactionSnapshot<'a, T>
impl<'a, T> Unpin for TransactionSnapshot<'a, T>
impl<'a, T> UnwindSafe for TransactionSnapshot<'a, T>where T: RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
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>where K: AsRef<[u8]>,
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<'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>where
K: AsRef<[u8]>,
fn get_pinned_full<K>( &'a self, key: K, readopts: Option<<T as GetPinned<'a>>::ReadOptions> ) -> Result<Option<DBPinnableSlice<'a>>, Error>where K: AsRef<[u8]>,
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.