pub trait ParserRunner<'a> {
type Input;
type Output;
type P<'m, X, Y>: ParserMonad<'m, Input = X, Output = Y>
where X: 'm;
// Required methods
fn parse(
&self,
input: &'a [Self::Input],
) -> ParseResult<'a, Self::Input, Self::Output>;
fn run(
&self,
param: &ParseState<'a, Self::Input>,
) -> ParseResult<'a, Self::Input, Self::Output>;
// Provided method
fn parse_as_result(
&self,
input: &'a [Self::Input],
) -> Result<Self::Output, ParseError<'a, Self::Input>> { ... }
}
Required Associated Types§
type Input
type Output
type P<'m, X, Y>: ParserMonad<'m, Input = X, Output = Y> where X: 'm
Required Methods§
Sourcefn parse(
&self,
input: &'a [Self::Input],
) -> ParseResult<'a, Self::Input, Self::Output>
fn parse( &self, input: &'a [Self::Input], ) -> ParseResult<'a, Self::Input, Self::Output>
Analyze input value(for ParseResult).
入力を解析する。
Sourcefn run(
&self,
param: &ParseState<'a, Self::Input>,
) -> ParseResult<'a, Self::Input, Self::Output>
fn run( &self, param: &ParseState<'a, Self::Input>, ) -> ParseResult<'a, Self::Input, Self::Output>
Analyze input value(for ParseResult).
入力を解析する。
Requires ParseState argument.
引数にParseStateが必要です。
Provided Methods§
Sourcefn parse_as_result(
&self,
input: &'a [Self::Input],
) -> Result<Self::Output, ParseError<'a, Self::Input>>
fn parse_as_result( &self, input: &'a [Self::Input], ) -> Result<Self::Output, ParseError<'a, Self::Input>>
Analyze input value(for Result).
入力を解析する。
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.