Struct proc_macro::Diagnostic
[−]
[src]
pub struct Diagnostic { /* fields omitted */ }A structure representing a diagnostic message and associated children messages.
Methods
impl Diagnostic[src]
fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic[src]
Create a new diagnostic with the given level and message.
fn spanned<T: Into<String>>(span: Span, level: Level, message: T) -> Diagnostic[src]
Create a new diagnostic with the given level and message pointing to
the given span.
fn span_error<T: Into<String>>(self, span: Span, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this methods name with the given span and message.
fn error<T: Into<String>>(self, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this method's name with the given message.
fn span_warning<T: Into<String>>(self, span: Span, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this methods name with the given span and message.
fn warning<T: Into<String>>(self, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this method's name with the given message.
fn span_note<T: Into<String>>(self, span: Span, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this methods name with the given span and message.
fn note<T: Into<String>>(self, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this method's name with the given message.
fn span_help<T: Into<String>>(self, span: Span, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this methods name with the given span and message.
fn help<T: Into<String>>(self, message: T) -> Diagnostic[src]
Add a new child diagnostic message to self with the level
identified by this method's name with the given message.
fn level(&self) -> Level[src]
Returns the diagnostic level for self.
fn emit(self)[src]
Emit the 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