use example::prelude::*;
pub struct Parser4;
#[derive(Debug, PartialEq)]
pub struct Parser4Result;
impl Parsable<()> for Parser4 {
fn parse<'a>(&mut self,
input: &'a [u8],
_: Option<&ParserResultVec>,
_: Option<&mut ()>)
-> IResult<&'a [u8], ParserResult> {
do_parse!(input, tag!("4") >> (Box::new(Parser4Result)))
}
}
impl fmt::Display for Parser4 {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Parser 4")
}
}