/// WARNING: ENSURE THAT BUF CONTAINS A ONE FULL RECORD.
/// Write trait implementation is made to allow passing Write trait objects to sort function in BAM parallel.
ENSURE THAT BUF CONTAINS A ONE FULL RECORD.
Write trait implementation is made to allow passing Write trait objects to sort function in BAM parallel.
ENSURE THAT BUF CONTAINS A ONE FULL RECORD . Write trait implementation is made to allow passing Write trait objects to sort function in BAM parallel .
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
        assert!(buf.len() > 0);
        // println!("Current record size is: {}", buf.len());
        let wrapper = BAMRawRecord(Cow::Borrowed(buf));
        self.push_record(&wrapper);
        Ok(buf.len())
    }
fn write ( & mut self , buf : & [ u8 ] ) -> std :: io :: Result < usize > { assert ! ( buf len ( ) 0 ) ; // println!("Current record size is: {}", buf.len()); let wrapper = BAMRawRecord ( Cow :: Borrowed ( buf ) ) ; self . push_record ( & wrapper ) ; Ok ( buf . len ( ) ) }
WARNING: ENSURE THAT BUF CONTAINS A ONE FULL RECORD.
WARNING : ENSURE THAT BUF CONTAINS A ONE FULL RECORD .
&mut self
buf
&[u8]