Trait Decodable

Source
pub trait Decodable<'a>
where Self: Sized,
{ // Required method fn decode(bytes: &'a [u8]) -> Result<Status<(usize, Self)>, DecodeError>; }

Required Methods§

Source

fn decode(bytes: &'a [u8]) -> Result<Status<(usize, Self)>, DecodeError>

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.

Implementations on Foreign Types§

Source§

impl<'buf> Decodable<'buf> for &'buf str

Source§

fn decode(bytes: &'buf [u8]) -> Result<Status<(usize, &'buf str)>, DecodeError>

Source§

impl<'buf> Decodable<'buf> for &'buf [u8]

Source§

fn decode(bytes: &'buf [u8]) -> Result<Status<(usize, &'buf [u8])>, DecodeError>

Implementors§

Source§

impl<'a> Decodable<'a> for Subscribe<'a>

Source§

impl<'a> Decodable<'a> for Packet<'a>

Source§

impl<'a> Decodable<'a> for Suback<'a>

Source§

impl<'buf> Decodable<'buf> for FixedHeader

Source§

impl<'buf> Decodable<'buf> for Will<'buf>