Type Alias source_map::SpanWithSource

source ·
pub type SpanWithSource = BaseSpan<SourceId>;

Aliased Type§

struct SpanWithSource {
    pub start: u32,
    pub end: u32,
    pub source: SourceId,
}

Fields§

§start: u32§end: u32§source: SourceId

Implementations§

source§

impl SpanWithSource

source

pub fn get_start(&self) -> Position

source

pub fn get_end(&self) -> Position

source

pub fn into_line_column_span<T: StringEncoding>( self, fs: &impl FileSystem ) -> LineColumnSpan<T>

source

pub const NULL_SPAN: SpanWithSource = _

TODO explain use cases

source

pub fn is_null(&self) -> bool

TODO explain use cases

source

pub fn without_source(self) -> Span

Trait Implementations§

source§

impl<T: Clone> Clone for BaseSpan<T>

source§

fn clone(&self) -> BaseSpan<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SpanWithSource

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Hash> Hash for BaseSpan<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T: PartialEq> PartialEq<BaseSpan<T>> for BaseSpan<T>

source§

fn eq(&self, other: &BaseSpan<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Eq> Eq for BaseSpan<T>

source§

impl<T> StructuralEq for BaseSpan<T>

source§

impl<T> StructuralPartialEq for BaseSpan<T>