Decode

Trait Decode 

Source
pub trait Decode: Sized {
    // Required method
    fn decode(data: &[u8]) -> Result<Self>;
}
Expand description

Trait for decoding messages.

Required Methods§

Source

fn decode(data: &[u8]) -> Result<Self>

Decode a message from bytes.

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§