pub trait ReadEndian: Read {
// Required methods
fn read_u32(&mut self) -> Result<u32, PcapError>;
fn read_i32(&mut self) -> Result<i32, PcapError>;
fn read_u16(&mut self) -> Result<u16, PcapError>;
fn endianness(&self) -> Endianness;
}
Expand description
A trait that encapsulates reading the types (u32, i32, u16) in an endian specific way.
Implemented by BigEndianReader
and LittleEndianReader
.