pub trait Storage {
// Required methods
fn get_individual_from_db(
&mut self,
storage: StorageId,
id: &str,
iraw: &mut Individual,
) -> Result<(), ResultCode>;
fn get_v(
&mut self,
storage: StorageId,
key: &str,
) -> Result<Option<String>, ResultCode>;
fn get_raw(
&mut self,
storage: StorageId,
key: &str,
) -> Result<Option<Vec<u8>>, ResultCode>;
fn put_kv(
&mut self,
storage: StorageId,
key: &str,
val: &str,
) -> Result<(), ResultCode>;
fn put_kv_raw(
&mut self,
storage: StorageId,
key: &str,
val: Vec<u8>,
) -> Result<(), ResultCode>;
fn remove(
&mut self,
storage: StorageId,
key: &str,
) -> Result<(), ResultCode>;
fn count(&mut self, storage: StorageId) -> Result<usize, ResultCode>;
}