pub trait Database<B>where
B: Backend,{
// Required methods
fn get<D>(&mut self, path: &str) -> Result<Option<D>, ()>
where D: DeserializeOwned;
fn save<'a, D>(&mut self, path: &str, data: &'a D) -> Result<&'a D, ()>
where D: Serialize;
}Expand description
Database to read and write data from the durable storage
Each field of the struct will be written in the
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.