Trait kalosm_sample::Parser
source · pub trait Parser {
type Error;
type Output;
type PartialState;
// Required method
fn parse<'a>(
&self,
state: &Self::PartialState,
input: &'a [u8]
) -> Result<ParseResult<'a, Self::PartialState, Self::Output>, Self::Error>;
}
Expand description
An incremental parser for a structured input.
Required Associated Types§
sourcetype PartialState
type PartialState
The state of the parser.
Required Methods§
sourcefn parse<'a>(
&self,
state: &Self::PartialState,
input: &'a [u8]
) -> Result<ParseResult<'a, Self::PartialState, Self::Output>, Self::Error>
fn parse<'a>( &self, state: &Self::PartialState, input: &'a [u8] ) -> Result<ParseResult<'a, Self::PartialState, Self::Output>, Self::Error>
Parse the given input.