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? {
    // ...
}

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.