Struct codespan_reporting::Diagnostic
[−]
[src]
pub struct Diagnostic { pub severity: Severity, pub message: String, pub labels: Vec<Label>, }
Represents a diagnostic message and associated child messages.
Fields
severity: Severity
The overall severity of the diagnostic
message: String
The main message associated with this diagnostic
labels: Vec<Label>
The labelled spans marking the regions of code that cause this diagnostic to be raised
Methods
impl Diagnostic
[src]
pub fn new<S: Into<String>>(severity: Severity, message: S) -> Diagnostic
[src]
pub fn new_bug<S: Into<String>>(message: S) -> Diagnostic
[src]
pub fn new_error<S: Into<String>>(message: S) -> Diagnostic
[src]
pub fn new_warning<S: Into<String>>(message: S) -> Diagnostic
[src]
pub fn new_note<S: Into<String>>(message: S) -> Diagnostic
[src]
pub fn new_help<S: Into<String>>(message: S) -> Diagnostic
[src]
pub fn with_label(self, label: Label) -> Diagnostic
[src]
pub fn with_labels<Labels: IntoIterator<Item = Label>>(
self,
labels: Labels
) -> Diagnostic
[src]
self,
labels: Labels
) -> Diagnostic
Trait Implementations
impl Clone for Diagnostic
[src]
fn clone(&self) -> Diagnostic
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more