Skip to main content

digits_range

Macro digits_range 

Source
macro_rules! digits_range {
    ($range:expr) => { ... };
}
Expand description

Helper to create a parser::digits_range parser using a range.

ยงExamples

let parser = parser::digits_range!(0u32..=15);
assert_eq!(parser.parse(b"12,34"), Ok((12, &b",34"[..])));
assert!(parser.parse(b"16,34").is_err());