pub struct DiagnosticRule {
pub name: String,
pub pattern: String,
pub severity: String,
pub message: String,
pub fix_template: Option<String>,
pub code: Option<String>,
}Expand description
Diagnostic rule configuration
Fields§
§name: StringRule name
pattern: StringPattern to match (regex or simple pattern)
severity: StringSeverity level: “error”, “warning”, “info”
message: StringDiagnostic message
fix_template: Option<String>Optional fix template
code: Option<String>Rule code for identification
Implementations§
Source§impl DiagnosticRule
impl DiagnosticRule
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validate the diagnostic rule
Trait Implementations§
Source§impl Clone for DiagnosticRule
impl Clone for DiagnosticRule
Source§fn clone(&self) -> DiagnosticRule
fn clone(&self) -> DiagnosticRule
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 DiagnosticRule
impl Debug for DiagnosticRule
Source§impl<'de> Deserialize<'de> for DiagnosticRule
impl<'de> Deserialize<'de> for DiagnosticRule
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
Auto Trait Implementations§
impl Freeze for DiagnosticRule
impl RefUnwindSafe for DiagnosticRule
impl Send for DiagnosticRule
impl Sync for DiagnosticRule
impl Unpin for DiagnosticRule
impl UnwindSafe for DiagnosticRule
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