Trait rust_htslib::tbx::Read
source · [−]pub trait Read: Sized {
fn read(&mut self, record: &mut Vec<u8>) -> Result<bool>;
fn records(&mut self) -> Records<'_, Self>ⓘNotable traits for Records<'a, R>impl<'a, R: Read> Iterator for Records<'a, R> type Item = Result<Vec<u8>>;
;
fn header(&self) -> &Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
;
}
Expand description
A trait for a Tabix reader with a read method.
Required Methods
sourcefn records(&mut self) -> Records<'_, Self>ⓘNotable traits for Records<'a, R>impl<'a, R: Read> Iterator for Records<'a, R> type Item = Result<Vec<u8>>;
fn records(&mut self) -> Records<'_, Self>ⓘNotable traits for Records<'a, R>impl<'a, R: Read> Iterator for Records<'a, R> type Item = Result<Vec<u8>>;
Iterator over the lines/records of the seeked region.
Note that, while being convenient, this is less efficient than pre-allocating a
Vec<u8>
and reading into it with the read()
method, since every iteration involves
the allocation of a new Vec<u8>
.