pub trait Dissect<'a> {
type Output;
// Required methods
fn dissect(&self) -> Result<Self::Output, Error>;
fn data(&self) -> &'a [u8] ⓘ;
fn header_len(&self) -> usize;
}Expand description
Trait for dissecting packet layers
Implement this trait to add support for dissecting protocol layers. The implementation should borrow from the packet data without copying.
Required Associated Types§
Required Methods§
Sourcefn dissect(&self) -> Result<Self::Output, Error>
fn dissect(&self) -> Result<Self::Output, Error>
Parse the next layer from the current packet data
Sourcefn header_len(&self) -> usize
fn header_len(&self) -> usize
Get the length of this layer’s header