[][src]Trait rkyv::Write

pub trait Write {
    type Error: 'static;
    pub fn pos(&self) -> usize;
pub fn write(&mut self, bytes: &[u8]) -> Result<(), Self::Error>; }

A #![no_std] compliant writer that knows where it is.

A type that is io::Write can be wrapped in an ArchiveWriter to equip it with Write. It's important that the memory for archived objects is properly aligned before attempting to read objects out of it, use the Aligned wrapper if it's appropriate.

Associated Types

type Error: 'static

The errors that may occur while writing.

Loading content...

Required methods

pub fn pos(&self) -> usize

Returns the current position of the writer.

pub fn write(&mut self, bytes: &[u8]) -> Result<(), Self::Error>

Attempts to write the given bytes to the writer.

Loading content...

Implementors

impl<T: AsRef<[u8]> + AsMut<[u8]>> Write for ArchiveBuffer<T>[src]

type Error = ArchiveBufferError

impl<W: Write> Write for ArchiveWriter<W>[src]

type Error = Error

Loading content...