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§

Required Methods§

source

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§

source

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>

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.

Implementors§

source§

impl<'a, T, R> GetPinned<'a> for Twhere T: GetPinnedCF<'a, ReadOptions = R>,

§

type ReadOptions = R