pub trait Encode {
// Provided method
fn encode(&self) -> Result<Vec<u8>, Box<dyn Error>>
where Self: Serialize { ... }
}Expand description
Adds serialisation via bincode and serde to a type.
Must be present on all major file types.
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.