pub trait PcapNgBlock<'a> {
    fn from_slice<B: ByteOrder>(
        slice: &'a [u8]
    ) -> Result<(&[u8], Self), PcapError>
    where
        Self: Sized
; fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>; fn into_block(self) -> Block<'a>; }
Expand description

Common interface for the PcapNg blocks

Required Methods§

source

fn from_slice<B: ByteOrder>(slice: &'a [u8]) -> Result<(&[u8], Self), PcapError>where
    Self: Sized,

Parse a new block from a slice

source

fn write_to<B: ByteOrder, W: Write>(&self, writer: &mut W) -> IoResult<usize>

Write the content of a block into a writer

source

fn into_block(self) -> Block<'a>

Convert a block into the Block enumeration

Implementors§