Trait ExprParserAsync

Source
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§

Source

async fn try_read_next_expr<'a>( &'a mut self, ) -> Result<Option<ESExpr<'a>>, ParseError<E>>

Try to read the next expression.

§Errors

Returns Err if an error occurs during parsing.

Source

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§

Source

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.

Implementors§