Skip to main content

Leb128ReadExt

Trait Leb128ReadExt 

Source
pub trait Leb128ReadExt: Read {
Show 24 methods // Provided methods fn read_uleb_u8(&mut self) -> Result<u8> { ... } fn read_uleb_u8_strict(&mut self) -> Result<u8> { ... } fn read_uleb_u16(&mut self) -> Result<u16> { ... } fn read_uleb_u16_strict(&mut self) -> Result<u16> { ... } fn read_uleb_u32(&mut self) -> Result<u32> { ... } fn read_uleb_u32_strict(&mut self) -> Result<u32> { ... } fn read_uleb_u64(&mut self) -> Result<u64> { ... } fn read_uleb_u64_strict(&mut self) -> Result<u64> { ... } fn read_uleb_u128(&mut self) -> Result<u128> { ... } fn read_uleb_u128_strict(&mut self) -> Result<u128> { ... } fn read_uleb_usize(&mut self) -> Result<usize> { ... } fn read_uleb_usize_strict(&mut self) -> Result<usize> { ... } fn read_sleb_i8(&mut self) -> Result<i8> { ... } fn read_sleb_i8_strict(&mut self) -> Result<i8> { ... } fn read_sleb_i16(&mut self) -> Result<i16> { ... } fn read_sleb_i16_strict(&mut self) -> Result<i16> { ... } fn read_sleb_i32(&mut self) -> Result<i32> { ... } fn read_sleb_i32_strict(&mut self) -> Result<i32> { ... } fn read_sleb_i64(&mut self) -> Result<i64> { ... } fn read_sleb_i64_strict(&mut self) -> Result<i64> { ... } fn read_sleb_i128(&mut self) -> Result<i128> { ... } fn read_sleb_i128_strict(&mut self) -> Result<i128> { ... } fn read_sleb_isize(&mut self) -> Result<isize> { ... } fn read_sleb_isize_strict(&mut self) -> Result<isize> { ... }
}
Expand description

Extension methods for reading LEB128 integers from byte streams.

§Target-width integers

usize and isize methods use the current Rust target’s pointer width. Prefer fixed-width integer methods such as Self::read_uleb_u64 or Self::read_sleb_i64 for persistent files and cross-platform protocols.

Provided Methods§

Source

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

Reads a non-strict unsigned LEB128 u8.

Source

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

Reads a strict unsigned LEB128 u8.

Source

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

Reads a non-strict unsigned LEB128 u16.

Source

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

Reads a strict unsigned LEB128 u16.

Source

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

Reads a non-strict unsigned LEB128 u32.

Source

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

Reads a strict unsigned LEB128 u32.

Source

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

Reads a non-strict unsigned LEB128 u64.

Source

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

Reads a strict unsigned LEB128 u64.

Source

fn read_uleb_u128(&mut self) -> Result<u128>

Reads a non-strict unsigned LEB128 u128.

Source

fn read_uleb_u128_strict(&mut self) -> Result<u128>

Reads a strict unsigned LEB128 u128.

Source

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

Reads a non-strict unsigned LEB128 usize.

Source

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

Reads a strict unsigned LEB128 usize.

Source

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

Reads a non-strict signed LEB128 i8.

Source

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

Reads a strict signed LEB128 i8.

Source

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

Reads a non-strict signed LEB128 i16.

Source

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

Reads a strict signed LEB128 i16.

Source

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

Reads a non-strict signed LEB128 i32.

Source

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

Reads a strict signed LEB128 i32.

Source

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

Reads a non-strict signed LEB128 i64.

Source

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

Reads a strict signed LEB128 i64.

Source

fn read_sleb_i128(&mut self) -> Result<i128>

Reads a non-strict signed LEB128 i128.

Source

fn read_sleb_i128_strict(&mut self) -> Result<i128>

Reads a strict signed LEB128 i128.

Source

fn read_sleb_isize(&mut self) -> Result<isize>

Reads a non-strict signed LEB128 isize.

Source

fn read_sleb_isize_strict(&mut self) -> Result<isize>

Reads a strict signed LEB128 isize.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R> Leb128ReadExt for R
where R: Read + ?Sized,