Struct proc_macro::Diagnostic
source · [−]pub struct Diagnostic { /* private fields */ }Expand description
A structure representing a diagnostic message and associated children messages.
Implementations
impl Diagnostic
source
impl Diagnostic
sourcepub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic
source
pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic
sourceCreates 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>,
source
pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
sourceCreates 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>,
source
pub fn span_error<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
sourceAdds a new child diagnostics message to self with the Level::Error level, and the given spans and message.
pub fn error<T: Into<String>>(self, message: T) -> Diagnostic
source
pub fn error<T: Into<String>>(self, message: T) -> Diagnostic
sourceAdds 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>,
source
pub fn span_warning<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
sourceAdds a new child diagnostics message to self with the Level::Warning level, and the given spans and message.
pub fn warning<T: Into<String>>(self, message: T) -> Diagnostic
source
pub fn warning<T: Into<String>>(self, message: T) -> Diagnostic
sourceAdds 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>,
source
pub fn span_note<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
sourceAdds a new child diagnostics message to self with the Level::Note level, and the given spans and message.
pub fn note<T: Into<String>>(self, message: T) -> Diagnostic
source
pub fn note<T: Into<String>>(self, message: T) -> Diagnostic
sourceAdds 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>,
source
pub fn span_help<S, T>(self, spans: S, message: T) -> Diagnostic where
S: MultiSpan,
T: Into<String>,
sourceAdds a new child diagnostics message to self with the Level::Help level, and the given spans and message.
pub fn help<T: Into<String>>(self, message: T) -> Diagnostic
source
pub fn help<T: Into<String>>(self, message: T) -> Diagnostic
sourceAdds a new child diagnostic message to self with the Level::Help level, and the given message.
pub fn set_message<T: Into<String>>(&mut self, message: T)
source
pub fn set_message<T: Into<String>>(&mut self, message: T)
sourceSets the message in self to message.
Trait Implementations
impl Clone for Diagnostic
source
impl Clone for Diagnostic
sourcefn clone(&self) -> Diagnostic
source
fn clone(&self) -> Diagnostic
sourceReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0 · source
fn clone_from(&mut self, source: &Self)
1.0.0 · sourcePerforms copy-assignment from source. Read more
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
source
impl<T> BorrowMut<T> for T where
T: ?Sized,
sourcefn borrow_mut(&mut self) -> &mut T
const: unstable · source
fn borrow_mut(&mut self) -> &mut T
const: unstable · sourceMutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
source
impl<T> ToOwned for T where
T: Clone,
sourcetype Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
source
fn clone_into(&self, target: &mut T)
sourceUses borrowed data to replace owned data, usually by cloning. Read more