pub trait ReadBytes {
// Required methods
fn read_u8(&mut self, endian: Endian) -> Result<u8>;
fn read_u16(&mut self, endian: Endian) -> Result<u16>;
fn read_u32(&mut self, endian: Endian) -> Result<u32>;
fn read_u64(&mut self, endian: Endian) -> Result<u64>;
fn read_u128(&mut self, endian: Endian) -> Result<u128>;
fn read_i8(&mut self, endian: Endian) -> Result<i8>;
fn read_i16(&mut self, endian: Endian) -> Result<i16>;
fn read_i32(&mut self, endian: Endian) -> Result<i32>;
fn read_i64(&mut self, endian: Endian) -> Result<i64>;
fn read_i128(&mut self, endian: Endian) -> Result<i128>;
fn read_f32(&mut self, endian: Endian) -> Result<f32>;
fn read_f64(&mut self, endian: Endian) -> Result<f64>;
}
Expand description
A trait for reading bytes.
This is implemented for all types that implement Read
.