Skip to main content

Fixer

Trait Fixer 

Source
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§

Source

fn describe(&self) -> String

Short human-readable summary of what this fixer does, independent of any specific violation.

Source

fn apply( &self, violation: &Violation, ctx: &FixContext<'_>, ) -> Result<FixOutcome>

Apply the fix against a single violation.

Implementors§