Struct xswag_base::diag::Report
[−]
[src]
pub struct Report { pub kind: ReportKind, pub span: Option<Span>, pub remarks: Vec<Remark>, }
Describes some kind of problem or occurrence in the code. Contains one or more remarks with descriptions and separate code spans.
This type doesn't provide a Display
impl, since all spans reference an
external filemap which needs to be provided. Use print
methods of the
diag
module instead.
Fields
kind: ReportKind
Kind of the report (usually the same as the first remark kind)
span: Option<Span>
Span of the main code snippet
remarks: Vec<Remark>
List of remarks describing the report
Methods
impl Report
[src]
fn simple_error<S: Into<String>>(msg: S, span: Span) -> Report
Creates a error report with one message and one span
fn simple_spanless_error<S: Into<String>>(msg: S) -> Report
Creates a error report with one message, but without span
fn simple_warning<S: Into<String>>(msg: S, span: Span) -> Report
Creates a warning report with one message and one span
fn with_note<S: Into<String>>(self, msg: S) -> Report
Adds a note without a span/code snippet to the existing Report
fn with_span_note<S: Into<String>>(self, msg: S, span: Span) -> Report
Adds a note with a span/code snippet to the existing Report
fn with_remark(self, rem: Remark) -> Report
Adds a remark to the returned Report
Trait Implementations
impl Debug for Report
[src]
impl Eq for Report
[src]
impl PartialEq for Report
[src]
fn eq(&self, __arg_0: &Report) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Report) -> bool
This method tests for !=
.
impl Clone for Report
[src]
fn clone(&self) -> Report
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more