noodles_vcf/header/record/value/map/other.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
//! Inner VCF header other map value.
pub(crate) mod tag;
pub use self::tag::Tag;
use super::{builder, Inner, Map};
/// An inner VCF header other map value.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Other {
pub(crate) id_tag: Tag,
}
impl Inner for Other {
type StandardTag = tag::Standard;
type Builder = builder::Identity;
}
impl Default for Other {
fn default() -> Self {
Self { id_tag: tag::ID }
}
}
impl Map<Other> {
/// Creates a nonstandard VCF header map value.
///
/// # Examples
///
/// ```
/// use noodles_vcf::header::record::value::{map::Other, Map};
/// let map = Map::<Other>::new();
/// ```
pub fn new() -> Self {
Self::default()
}
pub(crate) fn id_tag(&self) -> &Tag {
&self.inner.id_tag
}
}