Trait rkyv_dyn::DynSerializer[][src]

pub trait DynSerializer {
    fn pos_dyn(&self) -> usize;
fn write_dyn(&mut self, bytes: &[u8]) -> Result<(), DynError>; }

An object-safe version of Serializer.

Instead of an associated error type, DynSerializer returns the DynError type. If you have a serializer that already implements Serializer, then it will automatically implement DynSerializer.

Required methods

fn pos_dyn(&self) -> usize[src]

Returns the current position of the serializer.

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

Attempts to write the given bytes to the serializer.

Loading content...

Trait Implementations

impl<'a> Fallible for dyn DynSerializer + 'a[src]

type Error = DynError

The error produced by any failing methods

impl<'a> Serializer for dyn DynSerializer + 'a[src]

Implementations on Foreign Types

impl<S: Serializer + ?Sized> DynSerializer for &mut S[src]

Loading content...

Implementors

Loading content...