Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder {
    type Error;

    // Required method
    fn decode<R>(&self, target: &mut R) -> Result<Value, Self::Error>
       where R: Read + ReadBytesExt;
}
Expand description

A schema to de-serialize a value from bytes.

Required Associated Types§

Source

type Error

Error decoding a value.

Required Methods§

Source

fn decode<R>(&self, target: &mut R) -> Result<Value, Self::Error>
where R: Read + ReadBytesExt,

Decode a value from a target with the given schema.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§