Trait rustrict::CensorStr

source ·
pub trait CensorStr: Sized {
    fn censor(self) -> String;
    fn is(self, threshold: Type) -> bool;

    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§

The output is a newly allocated, censored string.

Returns true if text meets the provided threshold.

Provided Methods§

Returns true if the text is inappropriate.

Returns true if text does not meet the provided threshold.

Implementations on Foreign Types§

Implementors§