Skip to main content

MatchCallback

Trait MatchCallback 

Source
pub trait MatchCallback: Send + Sync {
    // Required method
    fn evaluate(&self, ctx: &MatchContext) -> Result<Decision, String>;
}
Expand description

A callback implementation. Must be pure with respect to the match: same input, same decision.

Required Methods§

Source

fn evaluate(&self, ctx: &MatchContext) -> Result<Decision, String>

Decides one match. An Err surfaces as an error-severity diagnostic naming the rule — the lint run itself is never affected.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§