pub fn read_signed_vint(
    buffer: &[u8]
) -> Result<Option<(i64, usize)>, ToolError>
Expand description

Reads a signed vint from the beginning of the input array slice.

This method returns an option with the None variant used to indicate there was not enough data in the buffer to completely read a vint.

The returned tuple contains the value of the vint (i64) and the length of the vint (usize). The length will be less than or equal to the length of the input slice.

§Errors

This method can return a ToolError if the input array cannot be read as a vint.