Function mini_leb128::read_i32

source ·
pub fn read_i32<'a, R>(reader: R) -> Result<(i32, NonZeroUsize)>where
R: Read<'a>,
Expand description

Decodes a signed 32-bit integer using LEB128.

Returns a tuple of the integer read and a NonZeroUsize that stores the number of bytes read.

Errors

Propagates any I/O errors originating from the reader. Otherwise, an error kind of InvalidData is thrown if the integer read does not fit in the integer’s datatype.