Trait rslint_core::Span[][src]

pub trait Span {
    fn as_range(&self) -> Range<usize>;

    fn as_text_range(&self) -> TextRange { ... }
fn join<T>(&self, other: T) -> Range<usize>
    where
        T: Span
, { ... }
fn between<T>(&self, other: T) -> Range<usize>
    where
        T: Span
, { ... }
fn until<T>(&self, other: T) -> Range<usize>
    where
        T: Span
, { ... }
fn sub_start(&self, amount: usize) -> Range<usize> { ... }
fn add_start(&self, amount: usize) -> Range<usize> { ... }
fn sub_end(&self, amount: usize) -> Range<usize> { ... }
fn add_end(&self, amount: usize) -> Range<usize> { ... } }
Expand description

A value which can be used as the range inside of a diagnostic.

This is essentially a hack to allow us to use SyntaxElement, SyntaxNode, etc directly

Required methods

Provided methods

Make a new span which extends to another span

from      to
^^^^^^^^^^^^

Make a new span which is between another span

from      to
    ^^^^^^

Make a new span which extends until another span

from      to
^^^^^^^^^^

Implementations on Foreign Types

Implementors