Trait persistentcache::PersistentCache [−][src]
pub trait PersistentCache { fn get(&mut self, _: &str) -> Result<Vec<u8>, Error>; fn set(&mut self, _: &str, _: &[u8]) -> Result<(), Error>; fn flush(&mut self) -> Result<(), Error>; }
Traits which need to be implemented by any storage
Required Methods
fn get(&mut self, _: &str) -> Result<Vec<u8>, Error>
Return serialized value of variable
fn set(&mut self, _: &str, _: &[u8]) -> Result<(), Error>
Set serialized value of variable
fn flush(&mut self) -> Result<(), Error>
Flush storage
Implementors
impl PersistentCache for FileStorage
impl PersistentCache for FileMemoryStorage
impl PersistentCache for RedisStorage