Trait rkyv::SerializeUnsized
source · [−]pub trait SerializeUnsized<S: Fallible + ?Sized>: ArchiveUnsized {
fn serialize_unsized(&self, serializer: &mut S) -> Result<usize, S::Error>;
fn serialize_metadata(
&self,
serializer: &mut S
) -> Result<Self::MetadataResolver, S::Error>;
}
Expand description
A counterpart of Serialize
that’s suitable for unsized types.
See ArchiveUnsized
for examples of implementing SerializeUnsized
.
Required methods
Writes the object and returns the position of the archived type.
fn serialize_metadata(
&self,
serializer: &mut S
) -> Result<Self::MetadataResolver, S::Error>
fn serialize_metadata(
&self,
serializer: &mut S
) -> Result<Self::MetadataResolver, S::Error>
Serializes the metadata for the given type.