pub enum Span {
Whole(Origin),
Builtin,
Span {
origin: Origin,
begin: Location,
end: Location,
},
}Expand description
Track an interval between two locations in a source file.
Span tracks an interval in a source file, represented either as a pair of begin/end
Location objects in the Span::Span variant, or as the Span::Whole variant that represents
the entire source file under consideration.
All the components in formally try hard to preserve locations and spans across the board, in
order to give users informative error messages even for errors originating quite far from the
parsers.
This means that any type that can be created even indirectly by parsing something from the user should probably contain a Span and implement at least the Located trait, and maybe also Locatable.
Variants§
Whole(Origin)
Builtin
The Span represents a built-in or primitive entity such as functions defined by SMT theories
Span
Implementations§
Trait Implementations§
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more