[][src]Trait dsf_core::base::WireDecode

pub trait WireDecode {
    type Output;
    type Error;
    type Ctx;
    fn decode(
        ctx: Self::Ctx,
        buff: &[u8]
    ) -> Result<(Self::Output, usize), Self::Error>; }

Parse trait for building parse-able objects

Associated Types

type Output

Output type returned from parsing

type Error

Error type returned on parse error

type Ctx

Context used in decoding

Loading content...

Required methods

fn decode(
    ctx: Self::Ctx,
    buff: &[u8]
) -> Result<(Self::Output, usize), Self::Error>

Parse method consumes a slice and returns an object and the remaining slice.

Loading content...

Implementors

Loading content...