pub trait DataBase {
// Required methods
fn get<K: DbKey>(&self) -> Option<&K::Value>;
fn put<K: DbKey>(&mut self, value: K::Value) -> Option<K::Value>;
// Provided method
fn get_cloned<K: DbKey>(&self) -> Option<K::Value>
where K::Value: Clone { ... }
}
Required Methods§
fn get<K: DbKey>(&self) -> Option<&K::Value>
fn put<K: DbKey>(&mut self, value: K::Value) -> Option<K::Value>
Provided 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.