Trait rustrict::CensorIter

source ·
pub trait CensorIter {
    type Iterator: Iterator<Item = char>;

    // Required method
    fn censor(self) -> Self::Iterator;
}
Expand description

CensorIter makes it easy to sanitize an arbitrary Iterator<Item=char> by calling .censor().

Required Associated Types§

Required Methods§

source

fn censor(self) -> Self::Iterator

Iteratively censor characters, yielding (except accents) those that are not inappropriate, and replacing those that are with '*'.

Implementors§

source§

impl<I: Iterator<Item = char> + Clone> CensorIter for I

§

type Iterator = Censor<I>