pub struct RuleDefinition { /* private fields */ }Expand description
The complete metadata required to register a lint rule.
Fields and construction are private: a rule identity can only come from RULES,
so a code or slug cannot exist without the rest of its metadata.
Implementations§
Source§impl RuleDefinition
impl RuleDefinition
pub const fn id(&self) -> RuleId
pub const fn code(&self) -> &'static str
pub const fn slug(&self) -> &'static str
pub const fn group(&self) -> RuleGroup
pub const fn default_level(&self) -> LintLevel
pub const fn rationale(&self) -> &'static str
pub const fn sound_alternative(&self) -> &'static str
pub const fn silence_flag(&self) -> &'static str
pub const fn examples(&self) -> RuleExamples
Trait Implementations§
Source§impl Clone for RuleDefinition
impl Clone for RuleDefinition
Source§fn clone(&self) -> RuleDefinition
fn clone(&self) -> RuleDefinition
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 moreimpl Copy for RuleDefinition
Source§impl Debug for RuleDefinition
impl Debug for RuleDefinition
impl Eq for RuleDefinition
Source§impl Hash for RuleDefinition
impl Hash for RuleDefinition
Source§impl PartialEq for RuleDefinition
impl PartialEq for RuleDefinition
impl StructuralPartialEq for RuleDefinition
Auto Trait Implementations§
impl Freeze for RuleDefinition
impl RefUnwindSafe for RuleDefinition
impl Send for RuleDefinition
impl Sync for RuleDefinition
impl Unpin for RuleDefinition
impl UnsafeUnpin for RuleDefinition
impl UnwindSafe for RuleDefinition
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