pub struct ScanHit {
pub path: PathBuf,
pub line: usize,
pub column: usize,
pub name: String,
}Expand description
Where a scanner found a variable reference.
Fields§
§path: PathBufFile the reference was found in.
line: usize1-based line number of the reference.
Lines are split on \n and \r\n. Files that use only bare \r
line endings (legacy Mac OS Classic) are treated as a single line;
implementations should document this in their own docs if relevant.
column: usize1-based character column where the reference begins (Unicode
scalar values, not bytes). Editors universally count columns in
characters, so a hit at column N lands where a user clicking
goto N would expect, even if the line contains multi-byte UTF-8
before the match.
name: StringVariable name as it appears in the code (e.g. DATABASE_URL).
Trait Implementations§
impl Eq for ScanHit
impl StructuralPartialEq for ScanHit
Auto Trait Implementations§
impl Freeze for ScanHit
impl RefUnwindSafe for ScanHit
impl Send for ScanHit
impl Sync for ScanHit
impl Unpin for ScanHit
impl UnsafeUnpin for ScanHit
impl UnwindSafe for ScanHit
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