pub struct Diagnostic {
pub severity: Severity,
pub pattern: AntiPattern,
pub message: String,
pub explanation: String,
pub suggested_fix: Option<String>,
pub references: Vec<String>,
}Expand description
A fully-formed diagnostic produced by the anti-pattern detector.
Contains everything needed to display a problem in an IDE or report:
the severity, the matched pattern (with location), a human-readable message,
a longer explanation, an optional suggested fix, and perldoc references.
Fields§
§severity: SeverityHow serious the problem is.
pattern: AntiPatternThe specific anti-pattern that triggered this diagnostic.
message: StringShort one-line summary suitable for an IDE problem marker.
explanation: StringLonger explanation of why the construct is problematic.
suggested_fix: Option<String>Optional concrete suggestion for fixing the problem.
references: Vec<String>Relevant perldoc pages or documentation references.
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 · 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 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