pub trait Pair {
type Open<'source>: Parse<'source>;
type Close<'source>: Parse<'source>;
const OPEN: TokenKind;
const CLOSE: TokenKind;
}Expand description
A trait for token kinds that have a logical pairing with another token kind. Only tokens that
implement Pair can be used with the Surrounded helper.
This includes tokens like parentheses, square brackets, and curly braces.
Required Associated Constants§
Required Associated Types§
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.