Struct noodles_bam::bai::AsyncWriter[][src]

pub struct AsyncWriter<W> { /* fields omitted */ }
Expand description

An async BAM index (BAI) writer.

Implementations

Creates an async BAM index (BAI) writer.

Examples
use noodles_bam::bai;
let writer = bai::AsyncWriter::new(Vec::new());

Returns the underlying writer.

Examples
use noodles_bam::bai;
let writer = bai::AsyncWriter::new(Vec::new());
assert!(writer.into_inner().is_empty());

Shuts down the output stream.

Examples
use noodles_bam::bai;
let mut writer = bai::AsyncWriter::new(Vec::new());
writer.shutdown().await?;

Writes a BAM index (BAI) header.

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

Examples
use noodles_bam::bai;
let mut writer = bai::AsyncWriter::new(Vec::new());
writer.write_header().await?;

Writes a BAM index.

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

Examples
use noodles_bam::bai;

let index = bai::Index::default();

let mut writer = bai::AsyncWriter::new(Vec::new());
writer.write_header().await?;
writer.write_index(&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.