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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.