pub struct ResolvedDiagnostic {
pub kind: DiagKind,
pub file_name: String,
pub line: u32,
pub col: u32,
pub message: String,
pub source_line: Option<String>,
pub range_cols: Option<(u32, u32)>,
}Expand description
One recorded diagnostic, re-exported because it appears in the façade’s
signatures (ParseError::diagnostics, ParsedJS::diagnostics).
Render one with hermes_support::render::render_diagnostic.
A fully resolved diagnostic handed to a DiagHandler. All buffer lookups
have already happened, so handlers are free of the source manager.
Fields§
§kind: DiagKind§file_name: String§line: u321-based line/col.
col: u32§message: String§source_line: Option<String>The source line text (without buffer access), if available.
range_cols: Option<(u32, u32)>0-based byte [start, end) columns of the highlighted range within the
source line, if a range was provided and the location is known.
None when no range is present or no source line is available.
Trait Implementations§
Source§impl Clone for ResolvedDiagnostic
impl Clone for ResolvedDiagnostic
Source§fn clone(&self) -> ResolvedDiagnostic
fn clone(&self) -> ResolvedDiagnostic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedDiagnostic
impl RefUnwindSafe for ResolvedDiagnostic
impl Send for ResolvedDiagnostic
impl Sync for ResolvedDiagnostic
impl Unpin for ResolvedDiagnostic
impl UnsafeUnpin for ResolvedDiagnostic
impl UnwindSafe for ResolvedDiagnostic
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