pub trait Detector: Send + Sync {
type Context;
type Detection;
// Required methods
fn detect(&self, context: &Self::Context) -> Vec<Self::Detection>;
fn confidence(&self) -> f64;
}Expand description
Detector trait for pattern detection
Required Associated Types§
Required Methods§
Sourcefn detect(&self, context: &Self::Context) -> Vec<Self::Detection>
fn detect(&self, context: &Self::Context) -> Vec<Self::Detection>
Detect patterns in the given context
Sourcefn confidence(&self) -> f64
fn confidence(&self) -> f64
Get detector confidence level