Struct solang_parser::diagnostics::Diagnostic
source · pub struct Diagnostic {
pub loc: Loc,
pub level: Level,
pub ty: ErrorType,
pub message: String,
pub notes: Vec<Note>,
}
Fields§
§loc: Loc
§level: Level
§ty: ErrorType
§message: String
§notes: Vec<Note>
Implementations§
source§impl Diagnostic
impl Diagnostic
pub fn debug(loc: Loc, message: String) -> Self
pub fn info(loc: Loc, message: String) -> Self
pub fn parser_error(loc: Loc, message: String) -> Self
pub fn error(loc: Loc, message: String) -> Self
pub fn decl_error(loc: Loc, message: String) -> Self
pub fn cast_error(loc: Loc, message: String) -> Self
pub fn cast_error_with_note(
loc: Loc,
message: String,
note_loc: Loc,
note: String
) -> Self
pub fn type_error(loc: Loc, message: String) -> Self
pub fn cast_warning(loc: Loc, message: String) -> Self
pub fn warning(loc: Loc, message: String) -> Self
pub fn warning_with_note(
loc: Loc,
message: String,
note_loc: Loc,
note: String
) -> Self
pub fn warning_with_notes(loc: Loc, message: String, notes: Vec<Note>) -> Self
pub fn error_with_note(
loc: Loc,
message: String,
note_loc: Loc,
note: String
) -> Self
pub fn error_with_notes(loc: Loc, message: String, notes: Vec<Note>) -> Self
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 Hash for Diagnostic
impl Hash for Diagnostic
source§impl Ord for Diagnostic
impl Ord for Diagnostic
source§fn cmp(&self, other: &Diagnostic) -> Ordering
fn cmp(&self, other: &Diagnostic) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<Diagnostic> for Diagnostic
impl PartialEq<Diagnostic> for Diagnostic
source§fn eq(&self, other: &Diagnostic) -> bool
fn eq(&self, other: &Diagnostic) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Diagnostic> for Diagnostic
impl PartialOrd<Diagnostic> for Diagnostic
source§fn partial_cmp(&self, other: &Diagnostic) -> Option<Ordering>
fn partial_cmp(&self, other: &Diagnostic) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more