pub struct Diagnostic {
pub file: String,
pub code: Option<String>,
pub id: Option<String>,
pub severity: String,
pub message: String,
pub path: String,
pub location: Option<(String, usize, usize)>,
}Expand description
One diagnostic, in the report’s field order (§12.2).
Fields§
§file: Stringthe file the diagnostic is reported against: the entry module by the path given, another module by its absolute path
code: Option<String>the diagnostic code (§12), when the finding carries one
id: Option<String>the constraint’s stable id (Type.name), for an assertion
severity: Stringerror, warn, or info
message: Stringthe message, rendered
path: Stringthe canonical path of the value the finding concerns (§7.2); empty for a module-level finding
location: Option<(String, usize, usize)>source span, 1-based (file, line, col); present for compile-time diagnostics (§12.2)
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.