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

pub fn le_u32<'a, I>() -> U32<LE, I> where
    I: RangeStream<Range = &'a [u8]>, 

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

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

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