pub trait ExprParserSync<E> {
// Required methods
fn try_read_next_expr<'a>(
&'a mut self,
) -> Result<Option<ESExpr<'a>>, ParseError<E>>;
fn read_next_expr<'a>(&'a mut self) -> Result<ESExpr<'a>, ParseError<E>>;
// Provided method
fn iter_static(
&mut self,
) -> impl Iterator<Item = Result<ESExpr<'static>, ParseError<E>>> { ... }
}
Expand description
An expression parser
Required Methods§
Sourcefn try_read_next_expr<'a>(
&'a mut self,
) -> Result<Option<ESExpr<'a>>, ParseError<E>>
fn try_read_next_expr<'a>( &'a mut self, ) -> Result<Option<ESExpr<'a>>, ParseError<E>>
Sourcefn read_next_expr<'a>(&'a mut self) -> Result<ESExpr<'a>, ParseError<E>>
fn read_next_expr<'a>(&'a mut self) -> Result<ESExpr<'a>, ParseError<E>>
Read the next expression
§Errors
Returns Err
if an error occurs during parsing, or if the end of the input is reached.
Provided Methods§
Sourcefn iter_static(
&mut self,
) -> impl Iterator<Item = Result<ESExpr<'static>, ParseError<E>>>
fn iter_static( &mut self, ) -> impl Iterator<Item = Result<ESExpr<'static>, ParseError<E>>>
Read all expressions, copying values when needed.
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.