pub struct RustDiagnostic {
pub level: String,
pub message: String,
pub spans: Vec<DiagnosticSpan>,
pub code: Option<String>,
}Available on crate feature
code only.Expand description
A parsed Rust compiler diagnostic.
Fields§
§level: StringSeverity level: "error", "warning", "note", "help".
message: StringThe diagnostic message.
spans: Vec<DiagnosticSpan>Source spans where the diagnostic applies.
code: Option<String>Optional error code (e.g., "E0308").
Trait Implementations§
Source§impl Clone for RustDiagnostic
impl Clone for RustDiagnostic
Source§fn clone(&self) -> RustDiagnostic
fn clone(&self) -> RustDiagnostic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RustDiagnostic
impl Debug for RustDiagnostic
Source§impl<'de> Deserialize<'de> for RustDiagnostic
impl<'de> Deserialize<'de> for RustDiagnostic
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RustDiagnostic, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RustDiagnostic, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RustDiagnostic
impl Serialize for RustDiagnostic
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RustDiagnostic
impl RefUnwindSafe for RustDiagnostic
impl Send for RustDiagnostic
impl Sync for RustDiagnostic
impl Unpin for RustDiagnostic
impl UnsafeUnpin for RustDiagnostic
impl UnwindSafe for RustDiagnostic
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