Skip to main content

DataStorage

Trait DataStorage 

Source
pub trait DataStorage: DynClone {
    // Required methods
    fn get(&self, key: &str) -> Result<Option<Vec<u8>>, String>;
    fn insert(&self, key: &str, value: &[u8]) -> Result<(), String>;
    fn open(path: &str) -> Self
       where Self: Sized;
}

Required Methods§

Source

fn get(&self, key: &str) -> Result<Option<Vec<u8>>, String>

Source

fn insert(&self, key: &str, value: &[u8]) -> Result<(), String>

Source

fn open(path: &str) -> Self
where Self: Sized,

Implementors§