Struct ezno_parser::Span
source · pub struct Span {
pub start: u32,
pub end: u32,
pub source: SourceId,
}
Expand description
A start and end. Also contains trace of original source
Fields§
§start: u32
§end: u32
§source: SourceId
Implementations§
source§impl Span
impl Span
sourcepub fn is_adjacent_to(&self, other: &Span) -> bool
pub fn is_adjacent_to(&self, other: &Span) -> bool
Returns whether the end of self
is the start of other
sourcepub fn union(&self, other: &Span) -> Span
pub fn union(&self, other: &Span) -> Span
Returns a new Span
which starts at the start of self
a ends at the end of other
pub fn get_start(&self) -> Position
pub fn get_end(&self) -> Position
pub fn into_line_column_span<T>(self, fs: &impl FileSystem) -> LineColumnSpan<T>where T: StringEncoding,
Trait Implementations§
source§impl PartialEq<Span> for Span
impl PartialEq<Span> for Span
source§impl SelfRustTokenize for Span
impl SelfRustTokenize for Span
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 Serialize for Span
impl Serialize for Span
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
source§impl Visitable for Span
impl Visitable for Span
fn visit<TData>( &self, _visitors: &mut (impl VisitorReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
fn visit_mut<TData>( &mut self, _visitors: &mut (impl VisitorMutReceiver<TData> + ?Sized), _data: &mut TData, _settings: &VisitSettings, _chain: &mut Annex<'_, Chain> )
impl Eq for Span
impl StructuralEq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more