pub struct Map<I>where
I: Inner,{ /* private fields */ }
Expand description
A VCF header map value.
Implementations
sourceimpl Map<AlternativeAllele>
impl Map<AlternativeAllele>
sourcepub fn new<D>(id: Symbol, description: D) -> Selfwhere
D: Into<String>,
pub fn new<D>(id: Symbol, description: D) -> Selfwhere
D: Into<String>,
Creates a VCF header alternative allele map value.
Examples
use noodles_vcf::{
header::record::value::{map::AlternativeAllele, Map},
record::alternate_bases::allele::{
symbol::{structural_variant::Type, StructuralVariant},
Symbol,
},
};
let map = Map::<AlternativeAllele>::new(
Symbol::StructuralVariant(StructuralVariant::from(Type::Deletion)),
"Deletion",
);
sourceimpl Map<Contig>
impl Map<Contig>
sourcepub fn new(id: Name) -> Self
pub fn new(id: Name) -> Self
Creates a VCF header contig map value.
Examples
use noodles_vcf::header::record::value::{map::Contig, Map};
let map = Map::<Contig>::new("sq0".parse()?);
sourcepub fn length(&self) -> Option<usize>
pub fn length(&self) -> Option<usize>
Returns the length.
Examples
use noodles_vcf::header::record::value::{map::Contig, Map};
let map = Map::<Contig>::new("sq0".parse()?);
assert!(map.length().is_none());
sourcepub fn length_mut(&mut self) -> &mut Option<usize>
pub fn length_mut(&mut self) -> &mut Option<usize>
Returns a mutable reference to the length.
Examples
use noodles_vcf::header::record::value::{map::Contig, Map};
let mut map = Map::<Contig>::new("sq0".parse()?);
assert!(map.length().is_none());
*map.length_mut() = Some(8);
assert_eq!(map.length(), Some(8));
sourceimpl Map<Filter>
impl Map<Filter>
sourceimpl Map<Format>
impl Map<Format>
sourcepub fn new<D>(id: Key, number: Number, ty: Type, description: D) -> Selfwhere
D: Into<String>,
pub fn new<D>(id: Key, number: Number, ty: Type, description: D) -> Selfwhere
D: Into<String>,
Creates a VCF header format map value.
Examples
use noodles_vcf::header::{
format::{Key, Type},
record::value::{map::Format, Map},
Number,
};
let map = Map::<Format>::new(Key::Genotype, Number::Count(1), Type::String, "Genotype");
sourceimpl Map<Info>
impl Map<Info>
sourcepub fn new<D>(id: Key, number: Number, ty: Type, description: D) -> Selfwhere
D: Into<String>,
pub fn new<D>(id: Key, number: Number, ty: Type, description: D) -> Selfwhere
D: Into<String>,
Creates a VCF header info map value.
Examples
use noodles_vcf::header::{
info::{Key, Type},
record::value::{map::Info, Map},
Number,
};
let map = Map::<Info>::new(
Key::SamplesWithDataCount,
Number::Count(1),
Type::Integer,
"Number of samples with data",
);
sourceimpl Map<Meta>
impl Map<Meta>
sourceimpl<I> Map<I>where
I: Inner,
impl<I> Map<I>where
I: Inner,
sourcepub fn other_fields(&self) -> &IndexMap<Other<I::StandardTag>, String>
pub fn other_fields(&self) -> &IndexMap<Other<I::StandardTag>, String>
Returns the nonstandard fields in the map.
sourceimpl<I> Map<I>where
I: Typed,
impl<I> Map<I>where
I: Typed,
sourcepub fn number_mut(&mut self) -> &mut Number
pub fn number_mut(&mut self) -> &mut Number
Returns a mutable reference to the number.
sourceimpl<I> Map<I>where
I: Described,
impl<I> Map<I>where
I: Described,
sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the description.
sourcepub fn description_mut(&mut self) -> &mut String
pub fn description_mut(&mut self) -> &mut String
Returns a mutable reference to the description.
Trait Implementations
sourceimpl Display for Map<AlternativeAllele>
impl Display for Map<AlternativeAllele>
sourceimpl<I: PartialEq> PartialEq<Map<I>> for Map<I>where
I: Inner,
I::Id: PartialEq,
I::StandardTag: PartialEq,
impl<I: PartialEq> PartialEq<Map<I>> for Map<I>where
I: Inner,
I::Id: PartialEq,
I::StandardTag: PartialEq,
sourceimpl TryFrom<(FileFormat, Vec<(String, String), Global>)> for Map<Format>
impl TryFrom<(FileFormat, Vec<(String, String), Global>)> for Map<Format>
type Error = TryFromFieldsError
type Error = TryFromFieldsError
The type returned in the event of a conversion error.
sourceimpl TryFrom<(FileFormat, Vec<(String, String), Global>)> for Map<Info>
impl TryFrom<(FileFormat, Vec<(String, String), Global>)> for Map<Info>
type Error = TryFromFieldsError
type Error = TryFromFieldsError
The type returned in the event of a conversion error.
impl<I: Eq> Eq for Map<I>where
I: Inner,
I::Id: Eq,
I::StandardTag: Eq,
impl<I> StructuralEq for Map<I>where
I: Inner,
impl<I> StructuralPartialEq for Map<I>where
I: Inner,
Auto Trait Implementations
impl<I> RefUnwindSafe for Map<I>where
I: RefUnwindSafe,
<I as Inner>::Id: RefUnwindSafe,
<I as Inner>::StandardTag: RefUnwindSafe,
impl<I> Send for Map<I>where
I: Send,
<I as Inner>::Id: Send,
<I as Inner>::StandardTag: Send,
impl<I> Sync for Map<I>where
I: Sync,
<I as Inner>::Id: Sync,
<I as Inner>::StandardTag: Sync,
impl<I> Unpin for Map<I>where
I: Unpin,
<I as Inner>::Id: Unpin,
<I as Inner>::StandardTag: Unpin,
impl<I> UnwindSafe for Map<I>where
I: UnwindSafe,
<I as Inner>::Id: UnwindSafe,
<I as Inner>::StandardTag: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
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.