fn to_hostname(&self) -> Result<Name, anyhow::Error> {
        let mut s = self.trim().to_string();
        for (regex, replacement) in TRANSLATION_TABLE.iter() {
            s = regex.replace_all(&s, *replacement).to_string();
        }

        let s = s.trim();

        if s == "." || s.ends_with(".") {
            return Err(anyhow!("Record {} not entered into catalog: '.' and records that ends in '.' are disallowed", s));
        }

        if s.len() == 0 {
            return Err(anyhow!("translated hostname {} is an empty string", self));
        }

        Ok(s.trim().into_name()?)
    }
// to_hostname turns member names into trust-dns compatible dns names.
to_hostname turns member names into trust-dns compatible dns names.
to_hostname turns member names into trust - dns compatible dns names .
fn to_hostname(&self) -> Result<Name, anyhow::Error> {
        let mut s = self.trim().to_string();
        for (regex, replacement) in TRANSLATION_TABLE.iter() {
            s = regex.replace_all(&s, *replacement).to_string();
        }
        let s = s.trim();
        if s == "." || s.ends_with(".") {
            return Err(anyhow!("Record {} not entered into catalog: '.' and records that ends in '.' are disallowed", s));
        }
        if s.len() == 0 {
            return Err(anyhow!("translated hostname {} is an empty string", self));
        }
        Ok(s.trim().into_name()?)
    }
fn to_hostname ( & self ) -> Result < Name , anyhow :: Error > { let mut s = self . trim ( ) . to_string ( ) ; for ( regex , replacement ) in TRANSLATION_TABLE . iter ( ) { s = regex . replace_all ( & s , * replacement ) . to_string ( ) ; } let s = s . trim ( ) ; if s == " " || s . ends_with ( " " ) { return Err ( anyhow ! ( " " s ) ) ; } if s . len ( ) == 0 { return Err ( anyhow ! ( " " self ) ) ; } Ok ( s . trim ( ) . into_name ( ) ? ) }
to_hostname turns member names into trust-dns compatible dns names.
to_hostname turns member names into trust - dns compatible dns names .
&self
&self