pub trait FastxReader: Send {
    // Required methods
    fn next(&mut self) -> Option<Result<SequenceRecord<'_>, ParseError>>;
    fn position(&self) -> &Position;
    fn line_ending(&self) -> Option<LineEnding>;
}
Expand description

The main trait, iterator-like, that the FASTA and FASTQ readers implement

Required Methods§

source

fn next(&mut self) -> Option<Result<SequenceRecord<'_>, ParseError>>

Gets the next record in the stream. This imitates the Iterator API but does not support any iterator functions. This returns None once we reached the EOF.

source

fn position(&self) -> &Position

Returns the current line/byte in the stream we are reading from

source

fn line_ending(&self) -> Option<LineEnding>

Returns whether the current stream uses Windows or Unix style line endings It is None only before calling next, once next has been called it will always return a line ending.

Implementors§

source§

impl<R: Read + Send> FastxReader for needletail::parser::FastaReader<R>

source§

impl<R: Read + Send> FastxReader for needletail::parser::FastqReader<R>