Trait ParseWithArgs

Source
pub trait ParseWithArgs<T, O = Self> {
    // Required method
    fn parse_with(
        token: Token,
        lexer: &mut Lexer,
        errors: &mut Vec<Error>,
        args: T,
    ) -> Option<O>;
}
Expand description

A trait that to parse this struct from a lexer and starting with a specific token and with specific arguments.

Required Methods§

Source

fn parse_with( token: Token, lexer: &mut Lexer, errors: &mut Vec<Error>, args: T, ) -> Option<O>

Try parsing the current item, starting from the passed token with the passed arguments.

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.

Implementations on Foreign Types§

Source§

impl<T: ParseWithArgs<A>, A: Clone> ParseWithArgs<A> for Vec<T>

Source§

fn parse_with( token: Token, lexer: &mut Lexer, errors: &mut Vec<Error>, args: A, ) -> Option<Self>

Implementors§