Enum Nucleotide
pub enum Nucleotide {
Adenine,
Cytosine,
Guanine,
Thymine,
Uracil,
Gap,
Ambiguous(char),
Unknown,
}Expand description
A primitive nucleotide symbol.
Variants§
Adenine
Adenine, displayed as A.
Cytosine
Cytosine, displayed as C.
Guanine
Guanine, displayed as G.
Thymine
Thymine, displayed as T.
Uracil
Uracil, displayed as U.
Gap
Gap, displayed as -.
Ambiguous(char)
Ambiguous nucleotide symbol, such as N.
Unknown
Explicit unknown nucleotide, displayed as ?.
Implementations§
§impl Nucleotide
impl Nucleotide
pub const fn parse_symbol(
symbol: char,
) -> Result<Nucleotide, NucleotideParseError>
pub const fn parse_symbol( symbol: char, ) -> Result<Nucleotide, NucleotideParseError>
Parses a common nucleotide symbol.
Recognized symbols are A, C, G, T, U, -, and N in either case for letters.
Other symbols return NucleotideParseError::InvalidSymbol.
§Errors
Returns NucleotideParseError::InvalidSymbol when the symbol is not recognized.
pub const fn kind(self) -> NucleotideKind
pub const fn kind(self) -> NucleotideKind
Returns the descriptive nucleotide kind.
Trait Implementations§
§impl Clone for Nucleotide
impl Clone for Nucleotide
§fn clone(&self) -> Nucleotide
fn clone(&self) -> Nucleotide
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for Nucleotide
impl Debug for Nucleotide
§impl Display for Nucleotide
impl Display for Nucleotide
§impl FromStr for Nucleotide
impl FromStr for Nucleotide
§type Err = NucleotideParseError
type Err = NucleotideParseError
The associated error which can be returned from parsing.
§fn from_str(value: &str) -> Result<Nucleotide, <Nucleotide as FromStr>::Err>
fn from_str(value: &str) -> Result<Nucleotide, <Nucleotide as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for Nucleotide
impl Hash for Nucleotide
§impl Ord for Nucleotide
impl Ord for Nucleotide
§impl PartialEq for Nucleotide
impl PartialEq for Nucleotide
§impl PartialOrd for Nucleotide
impl PartialOrd for Nucleotide
impl Copy for Nucleotide
impl Eq for Nucleotide
impl StructuralPartialEq for Nucleotide
Auto Trait Implementations§
impl Freeze for Nucleotide
impl RefUnwindSafe for Nucleotide
impl Send for Nucleotide
impl Sync for Nucleotide
impl Unpin for Nucleotide
impl UnsafeUnpin for Nucleotide
impl UnwindSafe for Nucleotide
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more