Struct noodles_bam::bai::async::Reader[][src]

pub struct Reader<R> where
    R: AsyncRead
{ /* fields omitted */ }
Expand description

An async BAM index (BAI) reader.

Implementations

Creates an async BAM index (BAI) reader.

Examples
use noodles_bam::bai;
let data = [];
let reader = bai::AsyncReader::new(&data[..]);

Reads the BAM index (BAI) header.

The position of the stream is expected to be at the start.

Examples
use noodles_bam::bai;

let data = b"BAI\x01";
let mut reader = bai::AsyncReader::new(&data[..]);
reader.read_header().await?;

Reads the BAM index.

The position of the stream is expected to be directly after the header.

Examples
use noodles_bam::bai;
use tokio::fs::File;

let mut reader = File::open("sample.bam.bai")
    .await
    .map(bai::AsyncReader::new)?;

reader.read_header().await?;

let index = reader.read_index().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.