Trait rkyv::SerializeUnsized

source ·
pub trait SerializeUnsized<S: Fallible + ?Sized>: ArchiveUnsized {
    // Required method
    fn serialize_unsized(&self, serializer: &mut S) -> Result<usize, 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.

Implementations on Foreign Types§

source§

impl<S: Fallible + Writer + ?Sized> SerializeUnsized<S> for str

source§

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

source§

impl<S: Fallible + Writer + ?Sized> SerializeUnsized<S> for CStr

source§

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

source§

impl<T, S> SerializeUnsized<S> for [T]
where T: Serialize<S>, S: Fallible + Allocator + Writer + ?Sized,

source§

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

Implementors§

source§

impl<T, S> SerializeUnsized<S> for T
where T: Serialize<S>, S: Fallible + Writer + ?Sized,