pub trait ContentClassifier: Send + Sync {
// Required method
fn classify(&self, content: &str) -> Result<Option<Sensitivity>>;
}Expand description
Optional local classifier that upgrades the L1 grade when regex evidence is ambiguous.
Implementations must be Send + Sync (called from proxy request paths).
Required Methods§
Sourcefn classify(&self, content: &str) -> Result<Option<Sensitivity>>
fn classify(&self, content: &str) -> Result<Option<Sensitivity>>
Classify content; Ok(None) defers to the L1 Sensitivity (the
scan result). Err falls back to the L1 grade
at the call site.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".