pub fn decode_i32_varint(buf: &[u8]) -> Result<(usize, i32), DecodeVarintError>Expand description
Decodes a value from LEB128 variable length format.
§Arguments
buf- A byte slice containing the LEB128 encoded value.
§Returns
-
Returns the bytes readed and the decoded value as
i32if successful. -
Returns
DecodeVarintErrorif the buffer did not contain a valid LEB128 encoding