Struct binary_reader::BinaryReader[][src]

pub struct BinaryReader {
    pub data: Vec<u8>,
    pub pos: usize,
    pub length: usize,
    pub endian: Endian,
}

Fields

data: Vec<u8>pos: usizelength: usizeendian: Endian

Implementations

Initialize BinaryReader from u8 slice.

Initialize BinaryReader from u8 Vector.

Initialize BinaryReader from std::fs::File.

Set endian for read method.

Jump position.

Read provided length size bytes.

Read provided length size bytes. Similar to read but this returns std::io::Result<&[u8]> instead of Option.

Read cstr. Read String(s) until null(aka 0x00).

Read signed 8 bit integer

Read signed 16 bit integer

Read signed 32 bit integer

Read signed 64 bit integer

Read 32 bit float

Read 64 bit float

Read unsigned 8 bit integer

Read unsigned 16 bit integer

Read unsigned 32 bit integer

Read unsigned 64 bit integer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.