/// Reads the next 16-bit signed integer, advancing the cursor by two
/// bytes.
Reads the next 16-bit signed integer, advancing the cursor by two
bytes.
Reads the next 16 - bit signed integer advancing the cursor by two bytes .
pub(crate) fn read_i16(&mut self) -> Result<i16> {
        if self.buf.len() < 2 {
            return Err(Error::InvalidInput("not enough buffer to read 16bit Int".to_owned()));
        }
        let val = i16::from_be_bytes([self.buf[0], self.buf[1]]);
        self.advance(2);
        Ok(val)
    }
pub ( crate ) fn read_i16 ( & mut self ) -> Result < i16 > { if self . buf . len ( ) < 2 { return Err ( Error :: InvalidInput ( " " . to_owned ( ) ) ) ; } let val = i16 :: from_be_bytes ( [ self . buf [ 0 ] , self . buf [ 1 ] ] ) ; self . advance ( 2 ) ; Ok ( val ) }
Reads the next 16-bit signed integer, advancing the cursor by two
bytes.
Reads the next 16 - bit signed integer advancing the cursor by two bytes .
&mut self