Skip to main content

TranslationTable

Trait TranslationTable 

Source
pub trait TranslationTable<A: Codec, B: Codec> {
    // Required methods
    fn to_amino(&self, codon: &SeqSlice<A>) -> B;
    fn to_codon(&self, amino: B) -> Result<Seq<A>, TranslationError<A, B>>;
}
Expand description

A codon translation table where all codons map to amino acids

Required Methods§

Source

fn to_amino(&self, codon: &SeqSlice<A>) -> B

Source

fn to_codon(&self, amino: B) -> Result<Seq<A>, TranslationError<A, B>>

§Errors

Will return Err when an amino acid has multiple codons (most cases)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§