Skip to main content

Unmarshal

Trait Unmarshal 

Source
pub trait Unmarshal: MarshalSize {
    // Required method
    fn unmarshal<B>(buf: &mut B) -> Result<Self>
       where Self: Sized,
             B: Buf;
}
Expand description

Decodes a value from its wire format.

Required Methods§

Source

fn unmarshal<B>(buf: &mut B) -> Result<Self>
where Self: Sized, B: Buf,

Decodes one value from buf, advancing it past the bytes consumed.

§Errors

Fails if buf is truncated, or if its contents are not a valid encoding of Self.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§