Trait ckb_rocksdb::ops::GetPinned
source · pub trait GetPinned<'a> {
type ReadOptions;
// Required method
fn get_pinned_full<K: AsRef<[u8]>>(
&'a self,
key: K,
readopts: Option<Self::ReadOptions>
) -> Result<Option<DBPinnableSlice<'a>>, Error>;
// Provided methods
fn get_pinned<K: AsRef<[u8]>>(
&'a self,
key: K
) -> Result<Option<DBPinnableSlice<'a>>, Error> { ... }
fn get_pinned_opt<K: AsRef<[u8]>>(
&'a self,
key: K,
readopts: Self::ReadOptions
) -> Result<Option<DBPinnableSlice<'a>>, Error> { ... }
}
Required Associated Types§
type ReadOptions
Required Methods§
sourcefn get_pinned_full<K: AsRef<[u8]>>(
&'a self,
key: K,
readopts: Option<Self::ReadOptions>
) -> Result<Option<DBPinnableSlice<'a>>, Error>
fn get_pinned_full<K: AsRef<[u8]>>( &'a self, 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.
Provided Methods§
sourcefn 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.
sourcefn 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.
Object Safety§
This trait is not object safe.