Trait SpanTransformer

Source
pub trait SpanTransformer {
    type Table;
    type Span: Copy;

    // Required methods
    fn token_id_of(table: &mut Self::Table, s: Self::Span) -> SpanId;
    fn span_for_token_id(table: &Self::Table, id: SpanId) -> Self::Span;
}

Required Associated Types§

Required Methods§

Source

fn token_id_of(table: &mut Self::Table, s: Self::Span) -> SpanId

Source

fn span_for_token_id(table: &Self::Table, id: SpanId) -> Self::Span

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 SpanTransformer for Span

Source§

type Table = IndexSet<SpanData<SyntaxContext>, BuildHasherDefault<FxHasher>>

Source§

type Span = SpanData<SyntaxContext>

Source§

fn token_id_of(table: &mut Self::Table, span: Self::Span) -> SpanId

Source§

fn span_for_token_id(table: &Self::Table, id: SpanId) -> Self::Span

Implementors§