pub struct Span {
pub line: u32,
pub col: u32,
pub offset: usize,
pub len: usize,
}Expand description
Source location for diagnostics.
Tracks the line, column, byte offset, and length of a token or construct in the original assembly source text.
Fields§
§line: u321-based line number.
col: u321-based column number (byte offset within line).
offset: usize0-based byte offset from start of source.
len: usizeByte length of the spanned region.
Implementations§
Trait Implementations§
impl Copy for Span
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 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