Trait engine_traits::Peekable [−][src]
Types from which values can be read.
Values are vectors of bytes, encapsulated in the associated DBVector type.
Method variants here allow for specifying ReadOptions, the column family
to read from, or to encode the value as a protobuf message.
Associated Types
Loading content...Required methods
fn get_value_opt(
&self,
opts: &ReadOptions,
key: &[u8]
) -> Result<Option<Self::DBVector>>[src]
&self,
opts: &ReadOptions,
key: &[u8]
) -> Result<Option<Self::DBVector>>
Read a value for a key, given a set of options.
Reads from the default column family.
Returns None if they key does not exist.
fn get_value_cf_opt(
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>>[src]
&self,
opts: &ReadOptions,
cf: &str,
key: &[u8]
) -> Result<Option<Self::DBVector>>
Read a value for a key from a given column family, given a set of options.
Returns None if the key does not exist.
Provided methods
fn get_value(&self, key: &[u8]) -> Result<Option<Self::DBVector>>[src]
Read a value for a key.
Uses the default options and column family.
Returns None if the key does not exist.
fn get_value_cf(&self, cf: &str, key: &[u8]) -> Result<Option<Self::DBVector>>[src]
Read a value for a key from a given column family.
Uses the default options.
Returns None if the key does not exist.
fn get_msg<M: Message + Default>(&self, key: &[u8]) -> Result<Option<M>>[src]
Read a value and return it as a protobuf message.
fn get_msg_cf<M: Message + Default>(
&self,
cf: &str,
key: &[u8]
) -> Result<Option<M>>[src]
&self,
cf: &str,
key: &[u8]
) -> Result<Option<M>>
Read a value and return it as a protobuf message.