Skip to main content

SpanTransformer

Trait SpanTransformer 

Source
pub trait SpanTransformer {
    type Table;
    type Span: Copy + 'static;

    // 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§

Source

type Table

Source

type Span: Copy + 'static

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".

Implementations on Foreign Types§

Source§

impl SpanTransformer for Span

Source§

type Table = IndexSet<Span, BuildHasherDefault<FxHasher>>

Source§

type Span = Span

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§