[][src]Function combine::any

pub fn any<I>() -> Any<I> where
    I: Stream

Parses any token.

let mut char_parser = any();
assert_eq!(char_parser.parse("!").map(|x| x.0), Ok('!'));
assert!(char_parser.parse("").is_err());
let mut byte_parser = any();
assert_eq!(byte_parser.parse(&b"!"[..]).map(|x| x.0), Ok(b'!'));
assert!(byte_parser.parse(&b""[..]).is_err());