pub(crate) mod builder;
pub use self::builder::Builder;
use std::io::{self, BufRead};
use noodles_vcf::{self as vcf, variant::Record};
pub struct Reader<R> {
inner: Box<dyn vcf::variant::io::Read<R>>,
}
impl<R> Reader<R>
where
R: BufRead,
{
pub fn read_header(&mut self) -> io::Result<vcf::Header> {
self.inner.read_variant_header()
}
pub fn records<'a>(
&'a mut self,
header: &'a vcf::Header,
) -> impl Iterator<Item = io::Result<Box<dyn Record>>> + 'a {
self.inner.variant_records(header)
}
}