Trait recode::RawDecoder

source ·
pub trait RawDecoder<Item = Self> {
    type Error;

    // Required method
    fn raw_decode<'a>(buf: &'a [u8]) -> Result<(Item, usize), Self::Error>
       where Item: 'a;
}

Required Associated Types§

source

type Error

The type of error that can occur if decoding fails.

Required Methods§

source

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(Item, usize), Self::Error>where Item: 'a,

Decodes a value from the given slice.

Arguments
  • buf - The slice to decode the value from.
Returns

The decoded value and the number of bytes read.

Implementations on Foreign Types§

source§

impl RawDecoder<usize> for i8

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where i8: 'a,

source§

impl RawDecoder<i128> for i128

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(i128, usize), Self::Error>where i128: 'a,

source§

impl RawDecoder<u32> for u32

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(u32, usize), Self::Error>where u32: 'a,

source§

impl RawDecoder<usize> for i64

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where i64: 'a,

source§

impl RawDecoder<usize> for u64

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where u64: 'a,

source§

impl RawDecoder<usize> for i128

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where i128: 'a,

source§

impl RawDecoder<i8> for i8

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(i8, usize), Self::Error>where i8: 'a,

source§

impl RawDecoder<usize> for u16

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where u16: 'a,

source§

impl RawDecoder<u128> for u128

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(u128, usize), Self::Error>where u128: 'a,

source§

impl RawDecoder<u64> for u64

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(u64, usize), Self::Error>where u64: 'a,

source§

impl RawDecoder<i32> for i32

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(i32, usize), Self::Error>where i32: 'a,

source§

impl RawDecoder<i64> for i64

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(i64, usize), Self::Error>where i64: 'a,

source§

impl RawDecoder<usize> for u8

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where u8: 'a,

source§

impl RawDecoder<u16> for u16

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(u16, usize), Self::Error>where u16: 'a,

source§

impl RawDecoder<usize> for u32

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where u32: 'a,

source§

impl RawDecoder<i16> for i16

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(i16, usize), Self::Error>where i16: 'a,

source§

impl RawDecoder<usize> for u128

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where u128: 'a,

source§

impl RawDecoder<usize> for i16

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where i16: 'a,

source§

impl RawDecoder<u8> for u8

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(u8, usize), Self::Error>where u8: 'a,

source§

impl RawDecoder<usize> for i32

§

type Error = Error

source§

fn raw_decode<'a>(buf: &'a [u8]) -> Result<(usize, usize), Self::Error>where i32: 'a,

Implementors§