pub trait Check {
// Required methods
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;
}
Expand description
Every checker must implement this trait Which checks the given text to see if its plaintext and returns CheckResult, which is our results object.
Required Methods§
Sourcefn check(&self, text: &str) -> CheckResult
fn check(&self, text: &str) -> CheckResult
Checks the given text to see if its plaintext
Sourcefn with_sensitivity(self, sensitivity: Sensitivity) -> Selfwhere
Self: Sized,
fn with_sensitivity(self, sensitivity: Sensitivity) -> Selfwhere
Self: Sized,
Sets the sensitivity level for gibberish detection
Sourcefn get_sensitivity(&self) -> Sensitivity
fn get_sensitivity(&self) -> Sensitivity
Gets the current sensitivity level
Implementors§
impl Check for Checker<Athena>
impl Check for Checker<DefaultChecker>
impl Check for Checker<EnglishChecker>
given an input, check every item in the array and return true if any of them match
impl Check for Checker<LemmeKnow>
impl Check for Checker<PasswordChecker>
Implementation of the Check trait for PasswordChecker