pub fn username(&self, username: &str) -> CredsResult<String> {
        use ammonia::clean;
        use unicode_normalization::UnicodeNormalization;

        let clean_username = clean(username)
            .to_lowercase()
            .nfc()
            .collect::<String>()
            .trim()
            .to_owned();

        self.validate_username(&clean_username)?;
        Ok(clean_username)
    }
/// Mormalises, converts to lowercase and applies filters to the username
Mormalises, converts to lowercase and applies filters to the username
Mormalises converts to lowercase and applies filters to the username
pub fn username(&self, username: &str) -> CredsResult<String> {
        use ammonia::clean;
        use unicode_normalization::UnicodeNormalization;
        let clean_username = clean(username)
            .to_lowercase()
            .nfc()
            .collect::<String>()
            .trim()
            .to_owned();
        self.validate_username(&clean_username)?;
        Ok(clean_username)
    }
pub fn username ( & self , username : & str ) -> CredsResult < String > { use ammonia :: clean ; use unicode_normalization :: UnicodeNormalization ; let clean_username = clean ( username ) . to_lowercase ( ) . nfc ( ) . collect :: < String > ( ) . trim ( ) . to_owned ( ) ; self . validate_username ( & clean_username ) ? ; Ok ( clean_username ) }
Mormalises, converts to lowercase and applies filters to the username
Mormalises converts to lowercase and applies filters to the username
&self
username
&str
&self
username
&str