pub trait Nucleotides {
    fn read_chunk(
        &mut self,
        buf: &mut [Nucleotide]
    ) -> Result<Option<usize>, Box<dyn Error>>; }
Expand description

Trait for providers of nucleotide sequence data.

The data is typically provided in chunks to avoid allocating too long sequences.

Required Methods

Read the next chunk of nucleotides from the sequence. The underlying reader will place the nucleotides into the provided buffer until the buffer is full. If the sequence is longer than the buffer, then the consumer needs to call the method again to retrieve more nucleotides.

This method returns the number of Nucleotides placed into the buffer or None if the underlying reader has reached the end of the sequence.

Implementors