pub trait SerializeUnsized<S: Fallible + ?Sized>: ArchiveUnsized {
    // Required methods
    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§

source

fn serialize_unsized(&self, serializer: &mut S) -> Result<usize, S::Error>

Writes the object and returns the position of the archived type.

source

fn serialize_metadata( &self, serializer: &mut S ) -> Result<Self::MetadataResolver, S::Error>

Serializes the metadata for the given type.

Implementations on Foreign Types§

source§

impl<S: Serializer + ?Sized> SerializeUnsized<S> for str

source§

impl<S: Serializer + ?Sized> SerializeUnsized<S> for CStr

source§

impl<T: Serialize<S>, S: ScratchSpace + Serializer + ?Sized> SerializeUnsized<S> for [T]

Implementors§