pub struct Diagnostic {
pub code: String,
pub severity: Severity,
pub message: String,
pub range: SourceRange,
pub expected: Vec<String>,
pub help: Option<String>,
pub related: Vec<RelatedInformation>,
}Expand description
Engine-owned portable diagnostic shared by native and future WASM outputs.
Fields§
§code: StringStable Stack diagnostic identifier.
severity: SeverityWhether the diagnostic prevents an artifact from being produced.
message: StringConcise human-readable diagnostic description.
range: SourceRangePrimary end-exclusive source range.
expected: Vec<String>Ordered source values or constructs valid at the primary range.
help: Option<String>Optional corrective guidance.
Other source locations involved in the diagnostic.
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
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 Diagnostic
impl Debug for Diagnostic
impl Eq for Diagnostic
Source§impl From<Diagnostic> for Diagnostic
impl From<Diagnostic> for Diagnostic
Source§fn from(diagnostic: Diagnostic) -> Self
fn from(diagnostic: Diagnostic) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Diagnostic
impl PartialEq 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 UnsafeUnpin 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