Type Alias ezno_parser::Span

source ·
pub type Span = BaseSpan<()>;

Aliased Type§

struct Span {
    pub start: u32,
    pub end: u32,
    pub source: (),
}

Fields§

§start: u32§end: u32§source: ()

Implementations§

source§

impl BaseSpan<()>

source

pub const NULL_SPAN: BaseSpan<()> = _

TODO explain use cases

source

pub fn is_null(&self) -> bool

TODO explain use cases

source

pub fn is_adjacent_to(&self, other: impl Into<Start>) -> bool

Returns whether the end of self is the start of other

source

pub fn union(&self, end: impl Into<End>) -> BaseSpan<()>

Returns a new Span which starts at the start of self a ends at the end of other

source

pub fn get_end(&self) -> End

source

pub fn get_start(&self) -> Start

source

pub fn with_source(self, source: SourceId) -> BaseSpan<SourceId>

Trait Implementations§

source§

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

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 BaseSpan<()>

source§

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

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

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

source§

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

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<BaseSpan<T>> for BaseSpan<T>where T: PartialEq<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> SelfRustTokenize for BaseSpan<T>where T: SelfRustTokenize,

source§

fn append_to_token_stream(&self, token_stream: &mut TokenStream)

source§

fn to_tokens(&self) -> TokenStream

Returns the tokens used to construct self
source§

impl<T> Serialize for BaseSpan<T>where T: Serialize,

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Visitable for Span

source§

fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )

source§

fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )

source§

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

source§

impl<T> StructuralEq for BaseSpan<T>

source§

impl<T> StructuralPartialEq for BaseSpan<T>