Struct noodles_vcf::header::alternative_allele::AlternativeAllele
source · [−]pub struct AlternativeAllele { /* private fields */ }
Expand description
A VCF header symbolic alternate allele record (ALT
).
Implementations
sourceimpl AlternativeAllele
impl AlternativeAllele
sourcepub fn new<D>(id: Symbol, description: D) -> Self where
D: Into<String>,
pub fn new<D>(id: Symbol, description: D) -> Self where
D: Into<String>,
Creates a VCF header symbolic alternate allele.
Examples
use noodles_vcf::{
header::AlternativeAllele,
record::alternate_bases::allele::{
symbol::{structural_variant::Type, StructuralVariant},
Symbol,
},
};
let alternative_allele = AlternativeAllele::new(
Symbol::StructuralVariant(StructuralVariant::from(Type::Deletion)),
"Deletion",
);
sourcepub fn id(&self) -> &Symbol
pub fn id(&self) -> &Symbol
Returns the alternate allele symbol.
Examples
use noodles_vcf::{
header::AlternativeAllele,
record::alternate_bases::allele::{
symbol::{structural_variant::Type, StructuralVariant},
Symbol,
},
};
let alternative_allele = AlternativeAllele::new(
Symbol::StructuralVariant(StructuralVariant::from(Type::Deletion)),
"Deletion",
);
assert_eq!(
alternative_allele.id(),
&Symbol::StructuralVariant(StructuralVariant::from(Type::Deletion)),
);
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the description of the alternate allele symbol.
Examples
use noodles_vcf::{
header::AlternativeAllele,
record::alternate_bases::allele::{
symbol::{structural_variant::Type, StructuralVariant},
Symbol,
},
};
let alternative_allele = AlternativeAllele::new(
Symbol::StructuralVariant(StructuralVariant::from(Type::Deletion)),
"Deletion",
);
assert_eq!(alternative_allele.description(), "Deletion");
Trait Implementations
sourceimpl Clone for AlternativeAllele
impl Clone for AlternativeAllele
sourcefn clone(&self) -> AlternativeAllele
fn clone(&self) -> AlternativeAllele
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AlternativeAllele
impl Debug for AlternativeAllele
sourceimpl Display for AlternativeAllele
impl Display for AlternativeAllele
sourceimpl PartialEq<AlternativeAllele> for AlternativeAllele
impl PartialEq<AlternativeAllele> for AlternativeAllele
sourcefn eq(&self, other: &AlternativeAllele) -> bool
fn eq(&self, other: &AlternativeAllele) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &AlternativeAllele) -> bool
fn ne(&self, other: &AlternativeAllele) -> bool
This method tests for !=
.
sourceimpl TryFrom<Record> for AlternativeAllele
impl TryFrom<Record> for AlternativeAllele
impl Eq for AlternativeAllele
impl StructuralEq for AlternativeAllele
impl StructuralPartialEq for AlternativeAllele
Auto Trait Implementations
impl RefUnwindSafe for AlternativeAllele
impl Send for AlternativeAllele
impl Sync for AlternativeAllele
impl Unpin for AlternativeAllele
impl UnwindSafe for AlternativeAllele
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more