pub trait Serialize<S>: Archive{
// Required method
fn serialize(
&self,
serializer: &mut S,
) -> Result<Self::Resolver, <S as Fallible>::Error>;
}Expand description
Converts a type to its archived form.
Objects perform any supportive serialization during
serialize. For types that reference nonlocal
(pointed-to) data, this is when that data must be serialized to the output.
These types will need to bound S to implement
Writer and any other required traits (e.g.
Sharing). They should then serialize their
dependencies during serialize.
See Archive for examples of implementing Serialize.
Required 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.