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: Loclevel: Levelty: ErrorTypemessage: Stringnotes: Vec<Note>Implementations
sourceimpl 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
sourceimpl Clone for Diagnostic
impl Clone for Diagnostic
sourcefn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Diagnostic
impl Debug for Diagnostic
sourceimpl Hash for Diagnostic
impl Hash for Diagnostic
sourceimpl Ord for Diagnostic
impl Ord for Diagnostic
sourcefn cmp(&self, other: &Diagnostic) -> Ordering
fn cmp(&self, other: &Diagnostic) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Diagnostic> for Diagnostic
impl PartialEq<Diagnostic> for Diagnostic
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &Diagnostic) -> bool
fn ne(&self, other: &Diagnostic) -> bool
This method tests for !=.
sourceimpl PartialOrd<Diagnostic> for Diagnostic
impl PartialOrd<Diagnostic> for Diagnostic
sourcefn partial_cmp(&self, other: &Diagnostic) -> Option<Ordering>
fn partial_cmp(&self, other: &Diagnostic) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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
impl Eq for Diagnostic
impl StructuralEq for Diagnostic
impl StructuralPartialEq for Diagnostic
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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