Function mini_leb128::write_u32

source ·
pub fn write_u32<W>(writer: W, n: u32) -> Result<NonZeroUsize>where
W: Write,
Expand description

Encodes an unsigned 32-bit integer using LEB128.

Returns a NonZeroUsize that stores how many bytes it took to encode the integer.

Errors

Propagates any I/O errors originating from the writer. However, encoding the integer itself is infallible.