pub struct Location {
pub file: Option<String>,
pub line: u32,
pub col: u32,
pub span: [u32; 2],
}Expand description
Source location of a diagnostic — a 1-based line/column plus an absolute byte span.
file is the canonical path string; absent for synthetic / REPL
diagnostics.
Fields§
§file: Option<String>File path; absent for synthetic / REPL / in-memory sources.
line: u321-based line number.
col: u321-based column number.
span: [u32; 2]Absolute byte span [start, end) into the source buffer.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Location
impl<'de> Deserialize<'de> for Location
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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