fn encipher(&self, ptext: &str) -> CipherResult {
        input::is_alpha(ptext)?;

        let ptext = ptext.to_ascii_uppercase();
        let ctext = ptext.bytes().map(|c| 90 - c + 65).collect();

        Ok(String::from_utf8(ctext).unwrap())
    }
/// Enciphers the given plaintext (a str reference) using the Atbash cipher
/// and returns the ciphertext as a `CipherResult`.
///
/// # Example
/// ```
/// use ciphers::{Cipher, Atbash};
///
/// let atbash = Atbash::new();
///
/// let ctext = atbash.encipher("ATTACKATDAWN");
/// assert_eq!(ctext.unwrap(), "ZGGZXPZGWZDM");
/// ```
Enciphers the given plaintext (a str reference) using the Atbash cipher
and returns the ciphertext as a `CipherResult`.
Enciphers the given plaintext ( a str reference ) using the Atbash cipher and returns the ciphertext as a ` CipherResult ` .
fn encipher(&self, ptext: &str) -> CipherResult {
        input::is_alpha(ptext)?;
        let ptext = ptext.to_ascii_uppercase();
        let ctext = ptext.bytes().map(|c| 90 - c + 65).collect();
        Ok(String::from_utf8(ctext).unwrap())
    }
fn encipher ( & self , ptext : & str ) -> CipherResult { input :: is_alpha ( ptext ) ? ; let ptext = ptext . to_ascii_uppercase ( ) ; let ctext = ptext . bytes ( ) . map ( | c | 90 - c + 65 ) . collect ( ) ; Ok ( String :: from_utf8 ( ctext ) . unwrap ( ) ) }
Enciphers the given plaintext (a str reference) using the Atbash cipher
and returns the ciphertext as a `CipherResult`.
Enciphers the given plaintext ( a str reference ) using the Atbash cipher and returns the ciphertext as a ` CipherResult ` .
&self
ptext
&str
&self
ptext
&str
example
```
use ciphers::{Cipher, Atbash}.

let atbash = Atbash::new().

let ctext = atbash.encipher("ATTACKATDAWN");
assert_eq!(ctext.unwrap(), "ZGGZXPZGWZDM");
```
` ` ` use ciphers :: { Cipher Atbash } . let atbash = Atbash :: new () . let ctext = atbash . encipher ( " ATTACKATDAWN " ) ; assert_eq! ( ctext . unwrap () " ZGGZXPZGWZDM " ) ; ` ` `