[][src]Trait dsf_core::base::Parse

pub trait Parse {
    type Output;
    type Error;
    fn parse(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

Loading content...

Required methods

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

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

Loading content...

Implementations on Foreign Types

impl Parse for String[src]

type Output = String

type Error = IoError

impl Parse for Vec<u8>[src]

type Output = Vec<u8>

type Error = IoError

impl Parse for SystemTime[src]

type Output = SystemTime

type Error = IoError

impl Parse for SocketAddrV4[src]

impl Parse for SocketAddrV6[src]

Loading content...

Implementors

impl Parse for Options[src]

Parse parses a control option from the given scope

type Output = Options

type Error = OptionsError

impl Parse for Header[src]

type Output = Header

type Error = IoError

impl Parse for Expiry[src]

type Output = Expiry

type Error = OptionsError

impl Parse for Issued[src]

type Output = Issued

type Error = OptionsError

impl Parse for Kind[src]

type Output = Kind

type Error = OptionsError

impl Parse for Limit[src]

type Output = Self

type Error = OptionsError

impl Parse for Metadata[src]

type Output = Metadata

type Error = OptionsError

impl Parse for Name[src]

type Output = Name

type Error = OptionsError

impl Parse for PeerId[src]

type Output = PeerId

type Error = OptionsError

impl Parse for PrevSig[src]

type Output = Self

type Error = OptionsError

impl Parse for PubKey[src]

type Output = PubKey

type Error = OptionsError

Loading content...