Trait keyvalint::KeyValueStore
source · pub trait KeyValueStore {
type Error: Debug;
type WriteBatch<'a>: WriteBatch;
// Required methods
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error>;
fn del(&self, key: &[u8]) -> Result<(), Self::Error>;
fn write(
&self,
write_batch: Self::WriteBatch<'_>
) -> Result<(), Self::Error>;
}
Expand description
A write-oriented key-value store. KeyValueStore is a pun on register store.
Required Associated Types§
sourcetype WriteBatch<'a>: WriteBatch
type WriteBatch<'a>: WriteBatch
The type of write batch accepted by this KeyValueStore.
Required Methods§
sourcefn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error>
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error>
Put the specified key as a single, isolated write.
Object Safety§
This trait is not object safe.