pub trait LocalWritableKeyValueStore: WithError {
const MAX_VALUE_SIZE: usize;
// Required methods
async fn write_batch(&self, batch: Batch) -> Result<(), Self::Error>;
async fn clear_journal(&self) -> Result<(), Self::Error>;
}
Expand description
Low-level, asynchronous write key-value operations. Useful for storage APIs not based on views.
Required Associated Constants§
Sourceconst MAX_VALUE_SIZE: usize
const MAX_VALUE_SIZE: usize
The maximal size of values that can be stored.
Required Methods§
Sourceasync fn write_batch(&self, batch: Batch) -> Result<(), Self::Error>
async fn write_batch(&self, batch: Batch) -> Result<(), Self::Error>
Writes the batch
in the database.
Sourceasync fn clear_journal(&self) -> Result<(), Self::Error>
async fn clear_journal(&self) -> Result<(), Self::Error>
Clears any journal entry that may remain.
The journal is located at the root_key
.
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.