pub trait Serialize {
// Required methods
fn save_to<W>(&self, writer: W) -> Result<(), Error>
where W: Write;
fn load_from<R>(reader: R) -> Result<Self, Error>
where R: Read,
Self: Sized;
}
Expand description
Save and load the structure
Required Methods§
fn save_to<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
fn load_from<R>(reader: R) -> Result<Self, Error>
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.