Struct tvix_eval::chunk::SourceSpan
source · struct SourceSpan {
span: Span,
start: usize,
}
Expand description
Represents a source location from which one or more operations were compiled.
The span itself is an index into a codemap::CodeMap, and the structure tracks the number of operations that were yielded from the same span.
At error reporting time, it becomes possible to either just fetch the textual representation of that span from the codemap, or to even re-parse the AST using rnix to create more semantically interesting errors.
Fields§
§span: Span
Span into the codemap::CodeMap.
start: usize
Index of the first operation covered by this span.
Trait Implementations§
source§impl Clone for SourceSpan
impl Clone for SourceSpan
source§fn clone(&self) -> SourceSpan
fn clone(&self) -> SourceSpan
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SourceSpan
impl Debug for SourceSpan
source§impl PartialEq for SourceSpan
impl PartialEq for SourceSpan
source§fn eq(&self, other: &SourceSpan) -> bool
fn eq(&self, other: &SourceSpan) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SourceSpan
Auto Trait Implementations§
impl Freeze for SourceSpan
impl RefUnwindSafe for SourceSpan
impl Send for SourceSpan
impl Sync for SourceSpan
impl Unpin for SourceSpan
impl UnwindSafe for SourceSpan
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