Trait endi::ReadBytes

source ·
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.

Required Methods§

source

fn read_u8(&mut self, endian: Endian) -> Result<u8>

Read a u8.

source

fn read_u16(&mut self, endian: Endian) -> Result<u16>

Read a u16.

source

fn read_u32(&mut self, endian: Endian) -> Result<u32>

Read a u32.

source

fn read_u64(&mut self, endian: Endian) -> Result<u64>

Read a u64.

source

fn read_u128(&mut self, endian: Endian) -> Result<u128>

Read a u128.

source

fn read_i8(&mut self, endian: Endian) -> Result<i8>

Read a i8.

source

fn read_i16(&mut self, endian: Endian) -> Result<i16>

Read a i16.

source

fn read_i32(&mut self, endian: Endian) -> Result<i32>

Read a i32.

source

fn read_i64(&mut self, endian: Endian) -> Result<i64>

Read a i64.

source

fn read_i128(&mut self, endian: Endian) -> Result<i128>

Read a i128.

source

fn read_f32(&mut self, endian: Endian) -> Result<f32>

Read a f32.

source

fn read_f64(&mut self, endian: Endian) -> Result<f64>

Read a f64.

Implementors§

source§

impl<R: Read> ReadBytes for R