pub trait DelimiterToken: Parse + DelimiterValue {
const KIND: DelimiterKind;
// Required methods
fn new(spans: DoubleSpan) -> Self;
fn spans(&self) -> DoubleSpan;
}Expand description
A generated typed refinement of one raw delimiter kind.
Delimiter atoms are the container analogue of Token![..]: the typed CST
stores the precise delimiter family, while TokenGroup
carries the erased raw representation.
Required Associated Constants§
Sourceconst KIND: DelimiterKind
const KIND: DelimiterKind
The raw delimiter family represented by this type.
Required Methods§
Sourcefn new(spans: DoubleSpan) -> Self
fn new(spans: DoubleSpan) -> Self
Creates a typed delimiter from its two boundary spans.
Sourcefn spans(&self) -> DoubleSpan
fn spans(&self) -> DoubleSpan
Returns the real opening and closing boundaries this atom was built from, or a collapsed pair when it was constructed from one span.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".