pub trait Detector {
// Required methods
fn kind(&self) -> DiscordKind;
fn fires(&self, context: &str) -> bool;
}Expand description
A detector for a single discord kind. Implementations check whether the kind fires at a given context.
Monotonicity obligation. A detector is monotone if
c_prime -> c and fires(c_prime) = true => fires(c) = trueTheorem 4 only applies if every detector in the registry is monotone. Detector authors must establish this property at design time. The substrate cannot prove monotonicity for arbitrary detector implementations; it can only assume the property and report frontier support accordingly.
Required Methods§
Sourcefn kind(&self) -> DiscordKind
fn kind(&self) -> DiscordKind
The discord kind this detector reports.