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§
Sourcefn next(&mut self) -> Option<Result<SequenceRecord<'_>, ParseError>>
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.
Sourcefn position(&self) -> &Position
fn position(&self) -> &Position
Returns the current line/byte in the stream we are reading from
Sourcefn line_ending(&self) -> Option<LineEnding>
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.