Trait DecodeMaybe

Source
pub trait DecodeMaybe: Sized {
    // Required method
    fn decode_maybe<B: Buf>(buf: &mut B) -> Result<Option<Self>>;
}
Expand description

Decode a type from a buffer if we have enough data.

Required Methods§

Source

fn decode_maybe<B: Buf>(buf: &mut B) -> Result<Option<Self>>

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§