pub trait DataStorage {
// Required methods
fn get(&self, key: &str) -> Result<String, StorageError>;
fn set(&mut self, key: &str, value: &str) -> Result<(), StorageError>;
fn remove(&mut self, key: &str) -> Result<(), StorageError>;
}
Expand description
The DataStorage trait allows access to a persistent storage. Each module has it’s own DataStorage, so there will never be a name clash.