Function combine::byte::num::i64 [] [src]

pub fn i64<'a, B, I>() -> I64<B, I> where
    I: RangeStream<Range = &'a [u8]>,
    B: ByteOrder

Reads a i64 out of the byte stream with the specified endianess

use combine::byteorder::LE;
use combine::Parser;
use combine::byte::num::i64;

assert_eq!(i64::<LE, _>().parse(&b"\x01\0\0\0\0\0\0\0"[..]), Ok((1, &b""[..])));
assert!(i64::<LE, _>().parse(&b"\x01\0\0\0\0\0\0"[..]).is_err());