pub trait Parser {
type Input;
type Output;
fn parse(&self, data: &[Self::Input]) -> ParseResult<Self::Output>;
}
Expand description
Generic parser trait.
Only Output
and parse
need to be defined to apply the trait.
pub trait Parser {
type Input;
type Output;
fn parse(&self, data: &[Self::Input]) -> ParseResult<Self::Output>;
}
Generic parser trait.
Only Output
and parse
need to be defined to apply the trait.