pub fn digit<Input>() -> Digit<Input> where
    <Input as StreamOnce>::Error: ParseError<<Input as StreamOnce>::Token, <Input as StreamOnce>::Range, <Input as StreamOnce>::Position>,
    Input: Stream,
    Input: Stream<Token = char>, 
Expand description

Parses a base-10 digit.

use combine::Parser;
use combine::parser::char::digit;
assert_eq!(digit().parse("9"), Ok(('9', "")));
assert!(digit().parse("A").is_err());