pub mod header;
pub use header::*;
pub mod body;
pub use body::*;
pub trait Parse {
type Output;
type Error;
fn parse(buff: &[u8]) -> Result<(Self::Output, usize), Self::Error>;
}
pub trait Encode {
type Error;
fn encode(&self, buff: &mut [u8]) -> Result<usize, Self::Error>;
}
pub trait WireEncode {
type Error;
fn encode(&mut self, buff: &mut [u8]) -> Result<usize, Self::Error>;
}
pub trait WireDecode {
type Output;
type Error;
type Ctx;
fn decode(ctx: Self::Ctx, buff: &[u8]) -> Result<(Self::Output, usize), Self::Error>;
}