Nucleotide

Trait Nucleotide 

Source
pub trait Nucleotide: Symbol {
    type Amino: Symbol;

    const ALL: &[Self];

    // Required methods
    fn complement(self) -> Self;
    fn translate<G: GeneticCode>(
        codon: [Self; 3],
        genetic_code: G,
    ) -> Self::Amino;
}
Expand description

A nucleotide; either Nuc or AmbiNuc.

Required Associated Constants§

Source

const ALL: &[Self]

All possible nucleotides in ascending order

Required Associated Types§

Source

type Amino: Symbol

Amino acid; either Amino or AmbiAmino

Required Methods§

Source

fn complement(self) -> Self

Return this nucleotide’s complement.

See Nuc::complement or AmbiNuc::complement for details.

Source

fn translate<G: GeneticCode>(codon: [Self; 3], genetic_code: G) -> Self::Amino

Translate a codon into an amino acid

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§