/// Archives the given value at the nearest available position. If the serializer is already
/// aligned, it will archive it at the current position.
Archives the given value at the nearest available position. If the serializer is already
aligned, it will archive it at the current position.
Archives the given value at the nearest available position . If the serializer is already aligned it will archive it at the current position .
fn serialize_front<T: Serialize<Self>>(&mut self, value: &T) -> Result<usize, Self::Error> {
        self.align_for::<T::Archived>()?;
        let pos = self.pos();
        self.seek(pos + mem::size_of::<T::Archived>())?;
        let resolver = value.serialize(self)?;
        self.seek(pos)?;
        unsafe {
            self.resolve_aligned(value, resolver)?;
        }
        Ok(pos)
    }
fn serialize_front < T : Serialize < Self > > ( & mut self , value : & T ) -> Result < usize , Self :: Error > { self . align_for :: < T :: Archived > ( ) ? ; let pos = self . pos ( ) ; self . seek ( pos + mem :: size_of :: < T :: Archived > ( ) ) ? ; let resolver = value . serialize ( self ) ? ; self . seek ( pos ) ? ; unsafe { self . resolve_aligned ( value , resolver ) ? ; } Ok ( pos ) }
Archives the given value at the nearest available position.
Archives the given value at the nearest available position .
&mut self
value
&T