pub trait StorageBackend: Send + Sync {
    // Required methods
    fn write(&mut self, slot: &Slot, value: &[u8]);
    fn read(&self, slot: &Slot) -> Option<Vec<u8>>;
}
Expand description

A trait that defines the interface for a storage backend for the dump-block feature.

Required Methods§

source

fn write(&mut self, slot: &Slot, value: &[u8])

Writes the given value to the storage backend. The slot is used as the key to the value.

source

fn read(&self, slot: &Slot) -> Option<Vec<u8>>

Reads the value from the storage backend. The slot is used as the key to the value.

Implementors§