Decode

Trait Decode 

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

This trait must be implemented to allow an arbitrary sized buffer to be deserialized.

§Errors

Exception generated when the buffer fails to be decoded to the target type.

Required Methods§

Source

fn decode(buffer: &[u8]) -> Result<Self, Exception>
where Self: Sized,

Decodes bytes into a Sized struct.

§Errors

Exception generated when the buffer fails to be decoded to the target type.

Implementations on Foreign Types§

Source§

impl Decode for Vec<u8>

Source§

fn decode(buffer: &[u8]) -> Result<Self, Exception>

Implementors§