pub enum InnerReader {
Unindexed(Reader),
Indexed(IndexedReader),
}Expand description
Internal enum wrapping indexed or unindexed htslib readers.
This allows the Reader to work with both indexed and unindexed
VCF/BCF files through a unified interface.
Variants§
Unindexed(Reader)
An unindexed reader (sequential access only).
Indexed(IndexedReader)
An indexed reader (supports region queries).
Implementations§
Source§impl InnerReader
impl InnerReader
Sourcepub fn header_ptr(&self) -> *mut bcf_hdr_t
pub fn header_ptr(&self) -> *mut bcf_hdr_t
Get the raw header pointer.
Sourcepub fn empty_record(&self) -> Record
pub fn empty_record(&self) -> Record
Create an empty record for reading into.
Sourcepub fn read_record(&mut self, record: &mut Record) -> Option<Result<(), Error>>
pub fn read_record(&mut self, record: &mut Record) -> Option<Result<(), Error>>
Read the next record into the provided buffer.
Returns None at EOF, Some(Ok(())) on success, or Some(Err(...)) on error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InnerReader
impl RefUnwindSafe for InnerReader
impl Send for InnerReader
impl !Sync for InnerReader
impl Unpin for InnerReader
impl UnwindSafe for InnerReader
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