pub struct BinaryReaderLE<R> {
    pub inner: R,
}

Fields§

§inner: R

Implementations§

source§

impl<R: Read> BinaryReaderLE<R>

source

pub fn new(inner: R) -> Self

source§

impl<R: Seek> BinaryReaderLE<R>

source

pub fn align(&mut self, alignment: usize) -> Result<()>

Trait Implementations§

source§

impl<R: Read> BinaryRead for BinaryReaderLE<R>

source§

fn read_u8(&mut self) -> Result<u8>

Reads a u8 (1 byte(s)).
source§

fn read_u8_array(&mut self, len: Option<usize>) -> Result<Vec<u8>>

Reads an array of u8s (1 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_i8(&mut self) -> Result<i8>

Reads a i8 (1 byte(s)).
source§

fn read_i8_array(&mut self, len: Option<usize>) -> Result<Vec<i8>>

Reads an array of i8s (1 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_array_len(&mut self) -> Result<usize>

Reads the length for an array.
source§

fn read_u16(&mut self) -> Result<u16>

Reads a u16 (2 byte(s)).
source§

fn read_u16_array(&mut self, len: Option<usize>) -> Result<Vec<u16>>

Reads an array of u16s (2 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_u32(&mut self) -> Result<u32>

Reads a u32 (4 byte(s)).
source§

fn read_u32_array(&mut self, len: Option<usize>) -> Result<Vec<u32>>

Reads an array of u32s (4 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_u64(&mut self) -> Result<u64>

Reads a u64 (8 byte(s)).
source§

fn read_u64_array(&mut self, len: Option<usize>) -> Result<Vec<u64>>

Reads an array of u64s (8 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_i16(&mut self) -> Result<i16>

Reads a i16 (2 byte(s)).
source§

fn read_i16_array(&mut self, len: Option<usize>) -> Result<Vec<i16>>

Reads an array of i16s (2 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_i32(&mut self) -> Result<i32>

Reads a i32 (4 byte(s)).
source§

fn read_i32_array(&mut self, len: Option<usize>) -> Result<Vec<i32>>

Reads an array of i32s (4 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_i64(&mut self) -> Result<i64>

Reads a i64 (8 byte(s)).
source§

fn read_i64_array(&mut self, len: Option<usize>) -> Result<Vec<i64>>

Reads an array of i64s (8 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_f32(&mut self) -> Result<f32>

Reads a f32 (4 byte(s)).
source§

fn read_f32_array(&mut self, len: Option<usize>) -> Result<Vec<f32>>

Reads an array of f32s (4 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_f64(&mut self) -> Result<f64>

Reads a f64 (8 byte(s)).
source§

fn read_f64_array(&mut self, len: Option<usize>) -> Result<Vec<f64>>

Reads an array of f64s (8 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_bool(&mut self) -> Result<bool>

Reads a bool (1 byte).
source§

fn read_bool_array(&mut self, len: Option<usize>) -> Result<Vec<bool>>

Reads an array of bools (1 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_char(&mut self) -> Result<char>

Reads a char (1 byte).
source§

fn read_char_array(&mut self, len: Option<usize>) -> Result<Vec<char>>

Reads an array of chars (1 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_f16(&mut self) -> Result<f32>

Reads a f16 (2 bytes).
source§

fn read_f16_array(&mut self, len: Option<usize>) -> Result<Vec<f32>>

Reads an array of f16s (2 byte(s) each). If len is none the reader will determine the length by reading it.
source§

fn read_cstr(&mut self) -> Result<String>

Reads a c-string (null terminated string).
source§

fn read_str(&mut self, len: Option<usize>) -> Result<String>

Reads a string. If len is none the reader will determine the length by reading it.
source§

fn read_bytes(&mut self, len: Option<usize>) -> Result<Vec<u8>>

Reads bytes as Vec<u8>. If len is none the reader will determine the length by reading it.
source§

fn read_cstr_array(&mut self, len: Option<usize>) -> Result<Vec<String>>

Reads an array of c-strings. If len is none the reader will determine the length by reading it.
source§

fn read_str_array(&mut self, len: Option<usize>) -> Result<Vec<String>>

Reads an array of strings. If len is none the reader will determine the length by reading it.
source§

fn read_bytes_array(&mut self, len: Option<usize>) -> Result<Vec<Vec<u8>>>

Reads an array of bytes. If len is none the reader will determine the length by reading it.
source§

impl<R: Seek> Seek for BinaryReaderLE<R>

source§

fn seek(&mut self, pos: SeekFrom) -> Result<u64>

Seek to an offset, in bytes, in a stream. Read more
source§

fn stream_position(&mut self) -> Result<u64>

Returns the current seek position from the start of the stream. Read more
1.55.0 · source§

fn rewind(&mut self) -> Result<(), Error>

Rewind to the beginning of a stream. Read more
source§

fn stream_len(&mut self) -> Result<u64, Error>

🔬This is a nightly-only experimental API. (seek_stream_len)
Returns the length of this stream (in bytes). Read more

Auto Trait Implementations§

§

impl<R> RefUnwindSafe for BinaryReaderLE<R>where R: RefUnwindSafe,

§

impl<R> Send for BinaryReaderLE<R>where R: Send,

§

impl<R> Sync for BinaryReaderLE<R>where R: Sync,

§

impl<R> Unpin for BinaryReaderLE<R>where R: Unpin,

§

impl<R> UnwindSafe for BinaryReaderLE<R>where R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.