pub trait CensorStr: Sized {
// Required methods
fn censor(self) -> String;
fn is(self, threshold: Type) -> bool;
// Provided methods
fn is_inappropriate(self) -> bool { ... }
fn isnt(self, threshold: Type) -> bool { ... }
}
Expand description
CensorStr makes it easy to sanitize a String
or &str
by calling .censor()
.
Required Methods§
Provided Methods§
Sourcefn is_inappropriate(self) -> bool
fn is_inappropriate(self) -> bool
Returns true
if the text is inappropriate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.