[−][src]Trait rslint_errors::file::Span
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
Loading content...Provided methods
fn as_text_range(&self) -> TextRange
fn join<T: Span>(&self, other: T) -> Range<usize>
Make a new span which extends to another span
from to
^^^^^^^^^^^^
fn between<T: Span>(&self, other: T) -> Range<usize>
Make a new span which is between another span
from to
^^^^^^
fn until<T: Span>(&self, other: T) -> Range<usize>
Make a new span which extends until another span
from to
^^^^^^^^^^
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>
Implementations on Foreign Types
impl<T: Span, '_> Span for &'_ T
[src]
impl<T: Span, '_> Span for &'_ mut T
[src]
impl<T: Clone> Span for Range<T> where
T: Into<usize>,
[src]
T: Into<usize>,