/// Convert a single character tryte to its numerical equivalent
Convert a single character tryte to its numerical equivalent
Convert a single character tryte to its numerical equivalent
fn tryte_to_val(tryte: char) -> std::result::Result<usize, TrytesToBytesError> {
    iota_constants::TRYTE_ALPHABET
        .iter()
        .position(|&x| x == tryte)
        .map(|x| x as usize)
        .ok_or_else(|| TrytesToBytesError::StringNotTrytes(tryte))
}
fn tryte_to_val ( tryte : char ) -> std :: result :: Result < usize , TrytesToBytesError > { iota_constants :: TRYTE_ALPHABET . iter ( ) . position ( | & x | x == tryte ) . map ( | x | x as usize ) . ok_or_else ( | | TrytesToBytesError :: StringNotTrytes ( tryte ) ) }
Convert a single character tryte to its numerical equivalent
Convert a single character tryte to its numerical equivalent
tryte
char