pub struct NucleotideVariant {
pub location: Interval<NucleotideCoordinate>,
pub edit: NucleotideEdit,
}Expand description
Parsed nucleotide location and edit.
§Examples
use tinyhgvs::{NucleotideEdit, VariantDescription, parse_hgvs};
let variant = parse_hgvs("NM_004006.2:c.357+1G>A").unwrap();
match variant.description {
VariantDescription::Nucleotide(description) => {
assert!(matches!(
description.edit,
NucleotideEdit::Substitution { ref reference, ref alternate }
if reference == "G" && alternate == "A"
));
assert_eq!(description.location.start.coordinate, 357);
assert_eq!(description.location.start.offset, 1);
}
VariantDescription::Protein(_) => unreachable!("expected nucleotide variant"),
}Fields§
§location: Interval<NucleotideCoordinate>§edit: NucleotideEditTrait Implementations§
Source§impl Clone for NucleotideVariant
impl Clone for NucleotideVariant
Source§fn clone(&self) -> NucleotideVariant
fn clone(&self) -> NucleotideVariant
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 moreSource§impl Debug for NucleotideVariant
impl Debug for NucleotideVariant
Source§impl PartialEq for NucleotideVariant
impl PartialEq for NucleotideVariant
impl Eq for NucleotideVariant
impl StructuralPartialEq for NucleotideVariant
Auto Trait Implementations§
impl Freeze for NucleotideVariant
impl RefUnwindSafe for NucleotideVariant
impl Send for NucleotideVariant
impl Sync for NucleotideVariant
impl Unpin for NucleotideVariant
impl UnsafeUnpin for NucleotideVariant
impl UnwindSafe for NucleotideVariant
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