use crate::checkers::checker_result::CheckResult;
use gibberish_or_not::Sensitivity;
use lemmeknow::Identifier;
pub struct Checker<Type> {
pub name: &'static str,
pub description: &'static str,
pub link: &'static str,
pub tags: Vec<&'static str>,
pub expected_runtime: f32,
pub popularity: f32,
pub lemmeknow_config: Identifier,
pub sensitivity: Sensitivity,
pub enhanced_detector: Option<()>, pub _phantom: std::marker::PhantomData<Type>,
}
pub trait Check {
fn new() -> Self
where
Self: Sized;
fn check(&self, text: &str) -> CheckResult;
fn with_sensitivity(self, sensitivity: Sensitivity) -> Self
where
Self: Sized;
fn get_sensitivity(&self) -> Sensitivity;
}
pub trait SensitivityAware {
fn with_sensitivity(self, sensitivity: Sensitivity) -> Self
where
Self: Sized;
fn get_sensitivity(&self) -> Sensitivity;
}