Struct noodles_fastq::AsyncReader [−][src]
pub struct AsyncReader<R> { /* fields omitted */ }
Expand description
An async FASTQ reader.
Implementations
Creates an async FASTQ reader.
Examples
use noodles_fastq as fastq;
let data = [];
let reader = fastq::AsyncReader::new(&data[..]);
Reads a FASTQ record.
Examples
use noodles_fastq as fastq;
let data = b"@r0\nATCG\n+\nNDLS\n";
let mut reader = fastq::AsyncReader::new(&data[..]);
let mut record = fastq::Record::default();
reader.read_record(&mut record).await?;
assert_eq!(record.name(), b"r0");
assert_eq!(record.sequence(), b"ATCG");
assert_eq!(record.quality_scores(), b"NDLS");
Returns an (async) stream over records starting from the current (input) stream position.
Examples
use futures::TryStreamExt;
use noodles_fastq as fastq;
let data = b"@r0\nATCG\n+\nNDLS\n";
let mut reader = fastq::AsyncReader::new(&data[..]);
let mut records = reader.records();
while let Some(record) = records.try_next().await? {
// ...
}