pub struct RuleMetadata {
pub deprecated: bool,
pub deprecated_reason: Option<&'static str>,
pub replacement: Option<&'static str>,
pub category: RuleCategory,
pub introduced_in: Option<&'static str>,
pub stability: RuleStability,
pub overrides: Option<&'static str>,
}Expand description
Metadata about a rule’s status, category, and properties
Fields§
§deprecated: boolWhether the rule is deprecated
deprecated_reason: Option<&'static str>Reason for deprecation (if applicable)
replacement: Option<&'static str>Suggested replacement rule (if applicable)
category: RuleCategoryRule category for grouping
introduced_in: Option<&'static str>Version when rule was introduced
stability: RuleStabilityStability level of the rule
overrides: Option<&'static str>Rules that this rule overrides (for context-specific rules)
Implementations§
Source§impl RuleMetadata
impl RuleMetadata
Sourcepub fn stable(category: RuleCategory) -> Self
pub fn stable(category: RuleCategory) -> Self
Create metadata for a stable, active rule
Sourcepub fn deprecated(
category: RuleCategory,
reason: &'static str,
replacement: Option<&'static str>,
) -> Self
pub fn deprecated( category: RuleCategory, reason: &'static str, replacement: Option<&'static str>, ) -> Self
Create metadata for a deprecated rule
Sourcepub fn experimental(category: RuleCategory) -> Self
pub fn experimental(category: RuleCategory) -> Self
Create metadata for an experimental rule
Sourcepub fn reserved(reason: &'static str) -> Self
pub fn reserved(reason: &'static str) -> Self
Create metadata for a reserved rule number (never implemented)
Sourcepub fn introduced_in(self, version: &'static str) -> Self
pub fn introduced_in(self, version: &'static str) -> Self
Set the version when this rule was introduced
Trait Implementations§
Source§impl Clone for RuleMetadata
impl Clone for RuleMetadata
Source§fn clone(&self) -> RuleMetadata
fn clone(&self) -> RuleMetadata
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 moreAuto Trait Implementations§
impl Freeze for RuleMetadata
impl RefUnwindSafe for RuleMetadata
impl Send for RuleMetadata
impl Sync for RuleMetadata
impl Unpin for RuleMetadata
impl UnwindSafe for RuleMetadata
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