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§
Source§impl Nucleotide
impl Nucleotide
Sourcepub const fn parse_symbol(symbol: char) -> Result<Self, NucleotideParseError>
pub const fn parse_symbol(symbol: char) -> Result<Self, 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.
Sourcepub const fn kind(self) -> NucleotideKind
pub const fn kind(self) -> NucleotideKind
Returns the descriptive nucleotide kind.
Trait Implementations§
Source§impl Clone for Nucleotide
impl Clone for Nucleotide
Source§fn clone(&self) -> Nucleotide
fn clone(&self) -> Nucleotide
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Nucleotide
impl Debug for Nucleotide
Source§impl Display for Nucleotide
impl Display for Nucleotide
Source§impl FromStr for Nucleotide
impl FromStr for Nucleotide
Source§impl Hash for Nucleotide
impl Hash for Nucleotide
Source§impl Ord for Nucleotide
impl Ord for Nucleotide
Source§fn cmp(&self, other: &Nucleotide) -> Ordering
fn cmp(&self, other: &Nucleotide) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Nucleotide
impl PartialEq for Nucleotide
Source§fn eq(&self, other: &Nucleotide) -> bool
fn eq(&self, other: &Nucleotide) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§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