fn serialize_unsized_front<T: SerializeUnsized<Self> + ?Sized>(
        &mut self,
        value: &T,
    ) -> Result<usize, Self::Error>
    where
        T::Metadata: Serialize<Self>,
        T::Archived: ArchivePointee<ArchivedMetadata = Archived<T::Metadata>>,
    {
        self.align_for::<RelPtr<T::Archived>>()?;
        let pos = self.pos();
        self.seek(pos + mem::size_of::<RelPtr<T::Archived>>())?;
        let to = value.serialize_unsized(self)?;
        let metadata_resolver = value.serialize_metadata(self)?;
        self.seek(pos)?;
        unsafe { self.resolve_unsized_aligned(value, to, metadata_resolver) }
    }
/// Archives a reference to the given value at the nearest available position. If the serializer
/// is already aligned, it will archive it at the current position.
Archives a reference to the given value at the nearest available position. If the serializer
is already aligned, it will archive it at the current position.
Archives a reference to the given value at the nearest available position . If the serializer is already aligned it will archive it at the current position .
fn serialize_unsized_front<T: SerializeUnsized<Self> + ?Sized>(
        &mut self,
        value: &T,
    ) -> Result<usize, Self::Error>
    where
        T::Metadata: Serialize<Self>,
        T::Archived: ArchivePointee<ArchivedMetadata = Archived<T::Metadata>>,
    {
        self.align_for::<RelPtr<T::Archived>>()?;
        let pos = self.pos();
        self.seek(pos + mem::size_of::<RelPtr<T::Archived>>())?;
        let to = value.serialize_unsized(self)?;
        let metadata_resolver = value.serialize_metadata(self)?;
        self.seek(pos)?;
        unsafe { self.resolve_unsized_aligned(value, to, metadata_resolver) }
    }
fn serialize_unsized_front < T : SerializeUnsized < Self > + ? Sized > ( & mut self , value : & T , ) -> Result < usize , Self :: Error > where T :: Metadata : Serialize < Self > , T :: Archived : ArchivePointee < ArchivedMetadata = Archived < T :: Metadata > > , { self . align_for :: < RelPtr < T :: Archived > > ( ) ? ; let pos = self . pos ( ) ; self . seek ( pos + mem :: size_of :: < RelPtr < T :: Archived > > ( ) ) ? ; let to = value . serialize_unsized ( self ) ? ; let metadata_resolver = value . serialize_metadata ( self ) ? ; self . seek ( pos ) ? ; unsafe { self . resolve_unsized_aligned ( value , to , metadata_resolver ) } }
Archives a reference to the given value at the nearest available position.
Archives a reference to the given value at the nearest available position .
&mut self
value
&T
&mut self
value
&T