pub trait Fixer:
Send
+ Sync
+ Debug {
// Required methods
fn describe(&self) -> String;
fn apply(
&self,
violation: &Violation,
ctx: &FixContext<'_>,
) -> Result<FixOutcome>;
}Expand description
A mechanical corrector for a specific rule’s violations.
Required Methods§
Sourcefn describe(&self) -> String
fn describe(&self) -> String
Short human-readable summary of what this fixer does, independent of any specific violation.
Sourcefn apply(
&self,
violation: &Violation,
ctx: &FixContext<'_>,
) -> Result<FixOutcome>
fn apply( &self, violation: &Violation, ctx: &FixContext<'_>, ) -> Result<FixOutcome>
Apply the fix against a single violation.