[][src]Trait rkyv_dyn::DynWrite

pub trait DynWrite {
    fn pos(&self) -> usize;
fn write(&mut self, bytes: &[u8]) -> Result<(), DynError>; }

An object-safe version of Write.

Instead of an associated error type, DynWrite returns the DynError type. If you have a writer that already implements Write, then it will automatically implement DynWrite.

Required methods

fn pos(&self) -> usize

Returns the current position of the writer.

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

Attempts to write the given bytes to the writer.

Loading content...

Trait Implementations

impl<'a> Write for dyn DynWrite + 'a[src]

type Error = DynError

The errors that may occur while writing.

Implementations on Foreign Types

impl<'a, W: Write + ?Sized> DynWrite for &'a mut W[src]

Loading content...

Implementors

Loading content...