pub struct Diagnostic {
pub message: String,
pub code: Option<DiagnosticCode>,
level: String,
pub spans: Vec<DiagnosticSpan>,
pub children: Vec<Diagnostic>,
pub rendered: Option<String>,
}
Expand description
The root diagnostic JSON output emitted by the compiler.
Fields§
§message: String
The primary error message.
code: Option<DiagnosticCode>
§level: String
“error: internal compiler error”, “error”, “warning”, “note”, “help”.
spans: Vec<DiagnosticSpan>
§children: Vec<Diagnostic>
Associated diagnostic messages.
rendered: Option<String>
The message as rustc would render it.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl<'de> Deserialize<'de> for Diagnostic
impl<'de> Deserialize<'de> for Diagnostic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for Diagnostic
impl Hash for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl Eq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 168 bytes