pub trait KeyValueLoad {
type Error: Debug;
type RangeScan<'a>: Cursor<Error = Self::Error>
where Self: 'a;
// Required methods
fn load(
&self,
key: &[u8],
is_tombstone: &mut bool,
) -> Result<Option<Vec<u8>>, Self::Error>;
fn range_scan<T: AsRef<[u8]>>(
&self,
start_bound: &Bound<T>,
end_bound: &Bound<T>,
) -> Result<Self::RangeScan<'_>, Self::Error>;
// Provided method
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error> { ... }
}Expand description
A read-oriented key-value store. KeyValueLoad is a pun on register load.
Required Associated Types§
Required Methods§
Provided Methods§
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.