Struct proc_macro::Diagnostic [−][src]
pub struct Diagnostic { /* fields omitted */ }
Expand description
A structure representing a diagnostic message and associated children messages.
Implementations
Creates a new diagnostic with the given level
and message
.
pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
Creates a new diagnostic with the given level
and message
pointing to
the given set of spans
.
pub fn span_error<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
pub fn span_error<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
Adds a new child diagnostics message to self
with the Level::Error
level, and the given spans
and message
.
Adds a new child diagnostic message to self
with the Level::Error
level, and the given message
.
pub fn span_warning<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
pub fn span_warning<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
Adds a new child diagnostics message to self
with the Level::Warning
level, and the given spans
and message
.
Adds a new child diagnostic message to self
with the Level::Warning
level, and the given message
.
pub fn span_note<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
pub fn span_note<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
Adds a new child diagnostics message to self
with the Level::Note
level, and the given spans
and message
.
Adds a new child diagnostic message to self
with the Level::Note
level, and the given message
.
pub fn span_help<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
pub fn span_help<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
Adds a new child diagnostics message to self
with the Level::Help
level, and the given spans
and message
.
Adds a new child diagnostic message to self
with the Level::Help
level, and the given message
.
Returns the diagnostic level
for self
.
Sets the level in self
to level
.
Returns the message in self
.
Sets the message in self
to message
.
Returns the Span
s in self
.
Sets the Span
s in self
to spans
.
Returns an iterator over the children diagnostics of self
.
Trait Implementations
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
Mutably borrows from an owned value. Read more