Trait positioned_io::ReadIntAt [] [src]

pub trait ReadIntAt: ReadAt {
    fn read_u16_at(&self, pos: u64) -> Result<u16>;
    fn read_i16_at(&self, pos: u64) -> Result<i16>;
    fn read_u32_at(&self, pos: u64) -> Result<u32>;
    fn read_i32_at(&self, pos: u64) -> Result<i32>;
    fn read_u64_at(&self, pos: u64) -> Result<u64>;
    fn read_i64_at(&self, pos: u64) -> Result<i64>;
    fn read_uint_at(&self, pos: u64, nbytes: usize) -> Result<u64>;
    fn read_int_at(&self, pos: u64, nbytes: usize) -> Result<i64>;
    fn read_f32_at(&self, pos: u64) -> Result<f32>;
    fn read_f64_at(&self, pos: u64) -> Result<f64>;
}

Trait for reading positioned integers.

Does not require an endianness parameter, so it's useful for trait objects.

Required Methods

fn read_u16_at(&self, pos: u64) -> Result<u16>

Reads an unsigned 16-bit integer at an offset.

fn read_i16_at(&self, pos: u64) -> Result<i16>

Reads a signed 16-bit integer at an offset.

fn read_u32_at(&self, pos: u64) -> Result<u32>

Reads an unsigned 32-bit integer at an offset.

fn read_i32_at(&self, pos: u64) -> Result<i32>

Reads a signed 32-bit integer at an offset.

fn read_u64_at(&self, pos: u64) -> Result<u64>

Reads an unsigned 64-bit integer at an offset.

fn read_i64_at(&self, pos: u64) -> Result<i64>

Reads a signed 64-bit integer at an offset.

fn read_uint_at(&self, pos: u64, nbytes: usize) -> Result<u64>

Reads an unsigned nbytes-bit integer at an offset.

fn read_int_at(&self, pos: u64, nbytes: usize) -> Result<i64>

Reads a signed nbytes-bit integer at an offset.

fn read_f32_at(&self, pos: u64) -> Result<f32>

Reads a single-precision floating point number at an offset.

fn read_f64_at(&self, pos: u64) -> Result<f64>

Reads a double-precision floating point number at an offset.

Implementors