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

pub fn be_u64<'a, I>() -> U64<BE, I> where
    I: RangeStream<Range = &'a [u8]>,
    I::Error: ParseError<I::Item, I::Range, I::Position>, 

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

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

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