pub struct Location {
pub file: Option<String>,
pub line: usize,
pub col: usize,
}
Expand description
A location within a document buffer or document file. This module uses Location
to identify
to refer to locations of JSON5 syntax errors, while parsing) and also to locations in this Rust
source file, to improve unit testing output.
Fields§
§file: Option<String>
The name of the JSON5 document file being parsed and formatted (if provided).
line: usize
A line number within the JSON5 document. (The first line at the top of the document/file is line 1.)
col: usize
A character column number within the specified line. (The left-most character of the line is column 1).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin 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