Function combine::byte::byte [] [src]

pub fn byte<I>(c: u8) -> Token<I> where
    I: Stream<Item = u8>, 

Parses a character and succeeds if the character is equal to c.

let result = byte(b'!')
    .parse(&b"!"[..])
    .map(|x| x.0);
assert_eq!(result, Ok(b'!'));