Given a DNA strand, return its RNA complement (per RNA transcription).
Both DNA and RNA strands are a sequence of nucleotides.
The four nucleotides found in DNA are adenine (A), cytosine (C), guanine (G) and thymine (T).
The four nucleotides found in RNA are adenine (A), cytosine (C), guanine (G) and uracil (U).
Given a DNA strand, its transcribed RNA strand is formed by replacing each nucleotide with its complement:
By using private fields in structs with public
new functions returning
Result (as here with
RNA::new), we can guarantee
that the internal representation of
DNA is correct. Because every valid DNA
string has a valid RNA string, we don't need to return a
This explains the type signatures you will see in the tests.