Skip to main content

Decode

Trait Decode 

Source
pub trait Decode: TextDecode + BinaryDecode {
    // Provided method
    fn decode(data: &[u8], format: Format) -> Result<Self, Error> { ... }
}
Expand description

Combined decoding trait that supports both formats.

Provided Methods§

Source

fn decode(data: &[u8], format: Format) -> Result<Self, Error>

Decode from the specified format.

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.

Implementations on Foreign Types§

Source§

impl Decode for bool

Source§

impl Decode for f32

Source§

impl Decode for f64

Source§

impl Decode for i8

Source§

impl Decode for i16

Source§

impl Decode for i32

Source§

impl Decode for i64

Source§

impl Decode for u32

Source§

impl Decode for String

Source§

impl Decode for Vec<u8>

Source§

impl Decode for [u8; 16]

Implementors§