ByteEncoder

Trait ByteEncoder 

Source
pub trait ByteEncoder: Sized {
    // Required method
    fn serialize_bytes<'a, W: SerWrite>(
        ser: &'a mut Serializer<W, Self>,
        v: &[u8],
    ) -> Result<(), W::Error>
       where &'a mut Serializer<W, Self>: Serializer<Ok = (), Error = Error<W::Error>>;
}
Expand description

Determine how raw byte data types are serialized

Required Methods§

Source

fn serialize_bytes<'a, W: SerWrite>( ser: &'a mut Serializer<W, Self>, v: &[u8], ) -> Result<(), W::Error>
where &'a mut Serializer<W, Self>: Serializer<Ok = (), Error = Error<W::Error>>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§