Trait rkyv::ser::SeekSerializer[][src]

pub trait SeekSerializer: Serializer {
    fn seek(&mut self, pos: usize) -> Result<(), Self::Error>;

    fn archive_root<T: Serialize<Self>>(
        &mut self,
        value: &T
    ) -> Result<usize, Self::Error> { ... }
fn archive_ref_root<T: SerializeUnsized<Self> + ?Sized>(
        &mut self,
        value: &T
    ) -> Result<usize, Self::Error>
    where
        T::Metadata: Serialize<Self>,
        T::Archived: ArchivePointee<ArchivedMetadata = Archived<T::Metadata>>
, { ... } }

A serializer that can seek to an absolute position.

Required methods

fn seek(&mut self, pos: usize) -> Result<(), Self::Error>[src]

Seeks the serializer to the given absolute position.

Loading content...

Provided methods

fn archive_root<T: Serialize<Self>>(
    &mut self,
    value: &T
) -> Result<usize, Self::Error>
[src]

Archives the given value at the nearest available position. If the serializer is already aligned, it will archive it at the current position.

fn archive_ref_root<T: SerializeUnsized<Self> + ?Sized>(
    &mut self,
    value: &T
) -> Result<usize, Self::Error> where
    T::Metadata: Serialize<Self>,
    T::Archived: ArchivePointee<ArchivedMetadata = Archived<T::Metadata>>, 
[src]

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.

Loading content...

Implementors

impl<T: AsRef<[u8]> + AsMut<[u8]>> SeekSerializer for BufferSerializer<T>[src]

impl<W: Write + Seek> SeekSerializer for WriteSerializer<W>[src]

Loading content...