[][src]Trait simple_tlv::Decodable

pub trait Decodable<'a>: Sized {
    fn decode(decoder: &mut Decoder<'a>) -> Result<Self>;

    fn from_bytes(bytes: &'a [u8]) -> Result<Self> { ... }
}

Decoding trait.

Decode out of decoder, which essentially is a slice of bytes.

One way to implement this trait is to implement TryFrom<TaggedSlice<'_>, Error = Error>.

Required methods

fn decode(decoder: &mut Decoder<'a>) -> Result<Self>[src]

Attempt to decode this message using the provided decoder.

Loading content...

Provided methods

fn from_bytes(bytes: &'a [u8]) -> Result<Self>[src]

Parse Self from the provided byte slice.

Loading content...

Implementors

impl Decodable<'_> for Length[src]

impl Decodable<'_> for Tag[src]

impl Decodable<'_> for [u8; 0][src]

impl Decodable<'_> for [u8; 1][src]

impl Decodable<'_> for [u8; 2][src]

impl Decodable<'_> for [u8; 3][src]

impl Decodable<'_> for [u8; 4][src]

impl Decodable<'_> for [u8; 5][src]

impl Decodable<'_> for [u8; 6][src]

impl Decodable<'_> for [u8; 7][src]

impl Decodable<'_> for [u8; 8][src]

impl Decodable<'_> for [u8; 9][src]

impl Decodable<'_> for [u8; 10][src]

impl Decodable<'_> for [u8; 11][src]

impl Decodable<'_> for [u8; 12][src]

impl Decodable<'_> for [u8; 13][src]

impl Decodable<'_> for [u8; 14][src]

impl Decodable<'_> for [u8; 15][src]

impl Decodable<'_> for [u8; 16][src]

impl Decodable<'_> for [u8; 17][src]

impl Decodable<'_> for [u8; 18][src]

impl Decodable<'_> for [u8; 19][src]

impl Decodable<'_> for [u8; 20][src]

impl Decodable<'_> for [u8; 21][src]

impl Decodable<'_> for [u8; 22][src]

impl Decodable<'_> for [u8; 23][src]

impl Decodable<'_> for [u8; 24][src]

impl Decodable<'_> for [u8; 25][src]

impl Decodable<'_> for [u8; 26][src]

impl Decodable<'_> for [u8; 27][src]

impl Decodable<'_> for [u8; 28][src]

impl Decodable<'_> for [u8; 29][src]

impl Decodable<'_> for [u8; 30][src]

impl Decodable<'_> for [u8; 31][src]

impl Decodable<'_> for [u8; 32][src]

impl<'a> Decodable<'a> for TaggedSlice<'a>[src]

impl<'a, T> Decodable<'a> for T where
    T: TryFrom<TaggedSlice<'a>, Error = Error>, 
[src]

Loading content...