LexerRule

Trait LexerRule 

Source
pub trait LexerRule:
    Copy
    + Debug
    + Into<usize> {
    const COUNT: usize;
    const END: Self;
}
Expand description

A trait representing a lexer rule used for token matching. Each rule can be converted into an index and defines a total count of rules along with a designated end rule.

Required Associated Constants§

Source

const COUNT: usize

Total number of lexer rules.

Source

const END: Self

The end rule indicating termination of the lexing process.

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§