Function combine::parser::byte::num::be_u32[][src]

pub fn be_u32<'a, Input>(
) -> impl Parser<Input, Output = u32, PartialState = ()> where
    Input: Stream<Token = u8>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

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

use combine::Parser;
use combine::parser::byte::num::le_u32;

assert_eq!(le_u32().parse(&b"\x01\0\0\0"[..]), Ok((1, &b""[..])));
assert!(le_u32().parse(&b"\x01\0\0"[..]).is_err());