Trait Decode

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

Types implementing this trait can be decoded from msgpack.

Tuple also implements Decode with an implementation which just copies the bytes as is (and validates them).

Required Methods§

Source

fn decode(data: &'de [u8]) -> Result<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§

Source§

impl Decode<'_> for RawByteBuf

Source§

impl Decode<'_> for Tuple

Source§

impl<'de> Decode<'de> for &'de RawBytes

Source§

impl<'de, T> Decode<'de> for T
where T: Deserialize<'de>,