Struct proc_macro::Diagnostic
[−]
[src]
A structure representing a diagnostic message and associated children messages.
Methods
impl Diagnostic
[src]
[−]
impl Diagnostic
pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic
[src]
[−]
pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic
Create a new diagnostic with the given level
and message
.
pub fn spanned<T: Into<String>>(
span: Span,
level: Level,
message: T
) -> Diagnostic
[src]
[−]
pub fn spanned<T: Into<String>>(
span: Span,
level: Level,
message: T
) -> Diagnostic
Create a new diagnostic with the given level
and message
pointing to
the given span
.
pub fn span_error<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
[src]
[−]
pub fn span_error<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this methods name with the given span
and message
.
pub fn error<T: Into<String>>(self, message: T) -> Diagnostic
[src]
[−]
pub fn error<T: Into<String>>(self, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this method's name with the given message
.
pub fn span_warning<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
[src]
[−]
pub fn span_warning<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this methods name with the given span
and message
.
pub fn warning<T: Into<String>>(self, message: T) -> Diagnostic
[src]
[−]
pub fn warning<T: Into<String>>(self, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this method's name with the given message
.
pub fn span_note<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
[src]
[−]
pub fn span_note<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this methods name with the given span
and message
.
pub fn note<T: Into<String>>(self, message: T) -> Diagnostic
[src]
[−]
pub fn note<T: Into<String>>(self, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this method's name with the given message
.
pub fn span_help<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
[src]
[−]
pub fn span_help<T: Into<String>>(self, span: Span, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this methods name with the given span
and message
.
pub fn help<T: Into<String>>(self, message: T) -> Diagnostic
[src]
[−]
pub fn help<T: Into<String>>(self, message: T) -> Diagnostic
Add a new child diagnostic message to self
with the level
identified by this method's name with the given message
.
pub fn level(&self) -> Level
[src]
[−]
pub fn level(&self) -> Level
Returns the diagnostic level
for self
.
pub fn emit(self)
[src]
[−]
pub fn emit(self)
Emit the diagnostic.
Trait Implementations
impl Clone for Diagnostic
[src]
[+]
impl Clone for Diagnostic
impl Debug for Diagnostic
[src]
[+]
impl Debug for Diagnostic
Auto Trait Implementations
impl !Send for Diagnostic
impl !Send for Diagnostic
impl !Sync for Diagnostic
impl !Sync for Diagnostic