pub fn be_i16<'a, Input>() -> impl Parser<Input, Output = i16, PartialState = ()>
Expand description
Reads a i16 out of the byte stream with the specified endianess
use combine::Parser;
use combine::parser::byte::num::le_i16;
assert_eq!(le_i16().parse(&b"\x01\0"[..]), Ok((1, &b""[..])));
assert!(le_i16().parse(&b"\x01"[..]).is_err());