Trait ParsableContext

Source
pub trait ParsableContext {
    type Error;

    // Required method
    fn parse(&mut self, bytes: impl ConvertAsBytes) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

ParsableContext means that the item is parsable from raw bytes to itself with a self context

Required Associated Types§

Source

type Error

Error should be whatever your return error type is

Required Methods§

Source

fn parse(&mut self, bytes: impl ConvertAsBytes) -> Result<Self, Self::Error>
where Self: Sized,

parse converts raw bytes to itself

Implementors§