Struct solang_parser::diagnostics::Diagnostic
source · [−]pub struct Diagnostic {
pub level: Level,
pub ty: ErrorType,
pub pos: Loc,
pub message: String,
pub notes: Vec<Note>,
}
Fields
level: Level
ty: ErrorType
pos: Loc
message: String
notes: Vec<Note>
Implementations
sourceimpl Diagnostic
impl Diagnostic
pub fn debug(pos: Loc, message: String) -> Self
pub fn info(pos: Loc, message: String) -> Self
pub fn parser_error(pos: Loc, message: String) -> Self
pub fn error(pos: Loc, message: String) -> Self
pub fn decl_error(pos: Loc, message: String) -> Self
pub fn type_error(pos: Loc, message: String) -> Self
pub fn warning(pos: Loc, message: String) -> Self
pub fn warning_with_note(
pos: Loc,
message: String,
note_pos: Loc,
note: String
) -> Self
pub fn warning_with_notes(pos: Loc, message: String, notes: Vec<Note>) -> Self
pub fn error_with_note(
pos: Loc,
message: String,
note_pos: Loc,
note: String
) -> Self
pub fn error_with_notes(pos: Loc, message: String, notes: Vec<Note>) -> Self
Trait Implementations
sourceimpl Debug for Diagnostic
impl Debug for Diagnostic
sourceimpl Hash for Diagnostic
impl Hash for Diagnostic
sourceimpl Ord for Diagnostic
impl Ord for Diagnostic
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