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<()>
impl BaseSpan<()>
sourcepub fn is_adjacent_to(&self, other: impl Into<Start>) -> bool
pub fn is_adjacent_to(&self, other: impl Into<Start>) -> bool
Returns whether the end of self is the start of other
sourcepub fn union(&self, end: impl Into<End>) -> BaseSpan<()>
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
pub fn get_end(&self) -> End
pub fn get_start(&self) -> Start
pub fn with_source(self, source: SourceId) -> BaseSpan<SourceId>
Trait Implementations§
source§impl<T> PartialEq<BaseSpan<T>> for BaseSpan<T>where
T: PartialEq<T>,
impl<T> PartialEq<BaseSpan<T>> for BaseSpan<T>where T: PartialEq<T>,
source§impl<T> SelfRustTokenize for BaseSpan<T>where
T: SelfRustTokenize,
impl<T> SelfRustTokenize for BaseSpan<T>where T: SelfRustTokenize,
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
source§impl<T> Serialize for BaseSpan<T>where
T: Serialize,
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,
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