pub trait Storable: Jsonable + StoragePath {
// Provided methods
fn load() -> Result<Self, Error> { ... }
fn save(&self) -> Result<(), Error> { ... }
}Expand description
Trait for types that can be stored in a file.
If implemented, the type can be loaded from and saved to a file.
The file is located in the user’s home directory.
It requieres the type to implement the Jsonable and StoragePath traits.
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.