pub trait ExprParserAsync<E> {
// Required methods
async fn try_read_next_expr<'a>(
&'a mut self,
) -> Result<Option<ESExpr<'a>>, ParseError<E>>;
async fn read_next_expr<'a>(
&'a mut self,
) -> Result<ESExpr<'a>, ParseError<E>>;
// Provided method
fn iter_static(
&mut self,
) -> impl Stream<Item = Result<ESExpr<'static>, ParseError<E>>> { ... }
}
Expand description
An expression parser
Required Methods§
Sourceasync fn try_read_next_expr<'a>(
&'a mut self,
) -> Result<Option<ESExpr<'a>>, ParseError<E>>
async fn try_read_next_expr<'a>( &'a mut self, ) -> Result<Option<ESExpr<'a>>, ParseError<E>>
Sourceasync fn read_next_expr<'a>(&'a mut self) -> Result<ESExpr<'a>, ParseError<E>>
async 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 Stream<Item = Result<ESExpr<'static>, ParseError<E>>>
fn iter_static( &mut self, ) -> impl Stream<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.