devela::_dep::rkyv

Trait SerializeUnsized

pub trait SerializeUnsized<S>: ArchiveUnsized
where S: Fallible + ?Sized,
{ // Required method fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error> ; }
Available on crate feature dep_rkyv only.
Expand description

A counterpart of Serialize that’s suitable for unsized types.

See ArchiveUnsized for examples of implementing SerializeUnsized.

Required Methods§

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

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

Implementations on Foreign Types§

§

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

§

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

§

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

§

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

Implementors§

§

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

§

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