Function char

Source
pub fn char<I>(c: char) -> Token<I>
where I: Stream<Item = char>,
Expand description

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

let result = char('!')
    .parse("!")
    .map(|x| x.0);
assert_eq!(result, Ok('!'));