Struct noodles_cram::crai::AsyncWriter[][src]

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

An async CRAM index writer.

Implementations

Creates an async CRAM index writer.

Examples
use noodles_cram::crai;
let writer = crai::AsyncWriter::new(Vec::new());

Returns the underlying writer.

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

Shuts down the output stream.

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

Writes a CRAM index.

Examples
use noodles_bam as bam;
use noodles_cram::crai;

let mut writer = crai::AsyncWriter::new(Vec::new());

let index = vec![crai::Record::new(
    bam::record::ReferenceSequenceId::try_from(0).map(Some)?,
    10946,
    6765,
    17711,
    233,
    317811,
)];

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.

Should always be Self

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.