Struct Diagnostic
struct Diagnostic { ... }
A structure representing a diagnostic message and associated children messages.
Implementations
impl Diagnostic
fn new<T: Into<String>>(level: Level, message: T) -> DiagnosticCreates a new diagnostic with the given
levelandmessage.fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnostic where S: MultiSpan, T: Into<String>Creates a new diagnostic with the given
levelandmessagepointing to the given set ofspans.fn span_error<S, T>(self: Self, spans: S, message: T) -> Diagnostic where S: MultiSpan, T: Into<String>Adds a new child diagnostics message to
selfwith theLevel::Errorlevel, and the givenspansandmessage.fn error<T: Into<String>>(self: Self, message: T) -> DiagnosticAdds a new child diagnostic message to
selfwith theLevel::Errorlevel, and the givenmessage.fn span_warning<S, T>(self: Self, spans: S, message: T) -> Diagnostic where S: MultiSpan, T: Into<String>Adds a new child diagnostics message to
selfwith theLevel::Warninglevel, and the givenspansandmessage.fn warning<T: Into<String>>(self: Self, message: T) -> DiagnosticAdds a new child diagnostic message to
selfwith theLevel::Warninglevel, and the givenmessage.fn span_note<S, T>(self: Self, spans: S, message: T) -> Diagnostic where S: MultiSpan, T: Into<String>Adds a new child diagnostics message to
selfwith theLevel::Notelevel, and the givenspansandmessage.fn note<T: Into<String>>(self: Self, message: T) -> DiagnosticAdds a new child diagnostic message to
selfwith theLevel::Notelevel, and the givenmessage.fn span_help<S, T>(self: Self, spans: S, message: T) -> Diagnostic where S: MultiSpan, T: Into<String>Adds a new child diagnostics message to
selfwith theLevel::Helplevel, and the givenspansandmessage.fn help<T: Into<String>>(self: Self, message: T) -> DiagnosticAdds a new child diagnostic message to
selfwith theLevel::Helplevel, and the givenmessage.fn level(self: &Self) -> LevelReturns the diagnostic
levelforself.fn set_level(self: &mut Self, level: Level)Sets the level in
selftolevel.fn message(self: &Self) -> &strReturns the message in
self.fn set_message<T: Into<String>>(self: &mut Self, message: T)Sets the message in
selftomessage.fn spans(self: &Self) -> &[Span]Returns the
Spans inself.fn set_spans<S: MultiSpan>(self: &mut Self, spans: S)Sets the
Spans inselftospans.fn children(self: &Self) -> Children<'_>Returns an iterator over the children diagnostics of
self.fn emit(self: Self)Emit the diagnostic.
impl Clone for Diagnostic
fn clone(self: &Self) -> Diagnostic
impl Debug for Diagnostic
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
impl<T> Any for Diagnostic
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Diagnostic
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Diagnostic
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Diagnostic
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Diagnostic
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Diagnostic
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Diagnostic
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Diagnostic
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Diagnostic
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>