Struct swc_common::source_map::Loc
source · [−]pub struct Loc {
pub file: Lrc<SourceFile>,
pub line: usize,
pub col: CharPos,
pub col_display: usize,
}
Expand description
A source code location used for error reporting Note: This struct intentionally does not implement rkyv’s archieve to avoid redundant data copy (https://github.com/swc-project/swc/issues/5471) source_map_proxy constructs plugin-side Loc instead with shared SourceFile instance.
Fields
file: Lrc<SourceFile>
Information about the original source
line: usize
The (1-based) line number
col: CharPos
The (0-based) column offset
col_display: usize
The (0-based) column offset when displayed
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Loc
impl Send for Loc
impl Sync for Loc
impl Unpin for Loc
impl UnwindSafe for Loc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more