pub trait Serialize<S: Fallible + ?Sized>: Archive {
// Required method
fn serialize(&self, serializer: &mut S) -> Result<Self::Resolver, S::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 Serializer and
any other required traits (e.g. SharedSerializeRegistry). They
should then serialize their dependencies during serialize.
See Archive for examples of implementing Serialize.