Macro nom::i64 [−][src]
if the parameter is nom::Endianness::Big, parse a big endian i64 integer, otherwise a little endian i64 integer
use nom::number::Endianness; named!(be<i64>, i64!(Endianness::Big)); assert_eq!(be(b"\x00\x01\x02\x03\x04\x05\x06\x07abcd"), Ok((&b"abcd"[..], 0x0001020304050607))); assert_eq!(be(b"\x01"), Err(Err::Incomplete(Needed::Size(8)))); named!(le<i64>, i64!(Endianness::Little)); assert_eq!(le(b"\x00\x01\x02\x03\x04\x05\x06\x07abcd"), Ok((&b"abcd"[..], 0x0706050403020100))); assert_eq!(le(b"\x01"), Err(Err::Incomplete(Needed::Size(8))));