pub trait Loadable: Serializable {
// Provided methods
fn load(data: &[u8]) -> Result<Self>
where Self: Sized { ... }
fn save(&self) -> Result<Vec<u8>> { ... }
}
Expand description
Trait for objects that can be loaded from serialized data
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.