sanitise_file_name

Trait Replace

Source
pub trait Replace {
    // Required method
    fn replace(&self, char_being_removed: char) -> Option<char>;
}
Expand description

Required Methods§

Source

fn replace(&self, char_being_removed: char) -> Option<char>

Implementations on Foreign Types§

Source§

impl Replace for Option<char>

None: just remove the character, don’t replace it. Some: replace the character with this character.

Source§

fn replace(&self, _: char) -> Option<char>

Implementors§

Source§

impl<F: Fn(char) -> Option<char>> Replace for F

Call this function with the character that is being removed, and if it returns a character, replace it with that.