pub struct AsyncReader<R> { /* private fields */ }
Expand description

An async FASTA reader.

Implementations

Creates an async FASTA reader.

Examples
use noodles_fasta as fasta;
let data = [];
let mut reader = fasta::AsyncReader::new(&data[..]);

Reads a raw definition line.

Examples
use noodles_fasta as fasta;

let data = b">sq0\nACGT\n>sq1\nNNNN\nNNNN\nNN\n";
let mut reader = fasta::AsyncReader::new(&data[..]);

let mut buf = String::new();
reader.read_definition(&mut buf).await?;

assert_eq!(buf, ">sq0");

Reads a sequence.

Examples
use noodles_fasta as fasta;

let data = b">sq0\nACGT\n>sq1\nNNNN\nNNNN\nNN\n";
let mut reader = fasta::AsyncReader::new(&data[..]);
reader.read_definition(&mut String::new()).await?;

let mut buf = Vec::new();
reader.read_sequence(&mut buf).await?;

assert_eq!(buf, b"ACGT");

Seeks the underlying stream to the given position.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.