[−][src]Trait rust_htslib::bcf::Read
A trait for a BCF reader with a read method.
Required methods
pub fn read(&mut self, record: &mut Record) -> Option<Result<()>>[src]
Read the next record.
Arguments
- record - an empty record, that can be created with
bcf::Reader::empty_record.
Returns
None if end of file was reached, otherwise Some will contain a result with an error in case of failure.
pub fn records(&mut self) -> Records<'_, Self>ⓘ[src]
Return an iterator over all records of the VCF/BCF file.
pub fn header(&self) -> &HeaderView[src]
Return the header.
pub fn empty_record(&self) -> Record[src]
Return empty record. Can be reused multiple times.
pub fn set_threads(&mut self, n_threads: usize) -> Result<()>[src]
Activate multi-threaded BCF/VCF read support in htslib. This should permit faster reading of large VCF files.
Setting nthreads to 0 does not change the current state. Note that it is not
possible to set the number of background threads below 1 once it has been set.
Arguments
n_threads- number of extra background writer threads to use, must be> 0.
Implementors
impl Read for IndexedReader[src]
pub fn read(&mut self, record: &mut Record) -> Option<Result<()>>[src]
pub fn records(&mut self) -> Records<'_, Self>ⓘ[src]
pub fn set_threads(&mut self, n_threads: usize) -> Result<()>[src]
pub fn header(&self) -> &HeaderView[src]
pub fn empty_record(&self) -> Record[src]
impl Read for Reader[src]
pub fn read(&mut self, record: &mut Record) -> Option<Result<()>>[src]
pub fn records(&mut self) -> Records<'_, Self>ⓘ[src]
pub fn set_threads(&mut self, n_threads: usize) -> Result<()>[src]
pub fn header(&self) -> &HeaderView[src]
pub fn empty_record(&self) -> Record[src]
Return empty record. Can be reused multiple times.