Struct deno_ast::Diagnostic
source · pub struct Diagnostic {
pub specifier: String,
pub range: SourceRange,
pub kind: SyntaxError,
/* private fields */
}
Expand description
Parsing diagnostic.
Fields§
§specifier: String
Specifier of the source the diagnostic occurred in.
range: SourceRange
Range of the diagnostic.
kind: SyntaxError
Swc syntax error
Implementations§
source§impl Diagnostic
impl Diagnostic
sourcepub fn display_position(&self) -> LineAndColumnDisplay
pub fn display_position(&self) -> LineAndColumnDisplay
1-indexed display position the diagnostic occurred at.
source§impl Diagnostic
impl Diagnostic
pub fn from_swc_error( err: Error, specifier: &str, source: SourceTextInfo ) -> Diagnostic
Trait Implementations§
source§impl Clone for Diagnostic
impl Clone for Diagnostic
source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Diagnostic
impl Debug for Diagnostic
source§impl Display for Diagnostic
impl Display for Diagnostic
source§impl Error for Diagnostic
impl Error for Diagnostic
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
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