Struct bam::bam_writer::BamWriter[][src]

pub struct BamWriter<W: Write> { /* fields omitted */ }
Expand description

Bam writer. Can be created using from_path or using BamWriterBuilder.

Use RecordWriter trait to write records.

Implementations

Creates a BamWriterBuilder.

Creates a new BamWriter from a path and header.

Creates a new BamWriter from a stream and header.

Returns BAM header.

Consumes the writer and returns inner stream.

Pauses multi-thread writer until the next write operation. Does nothing to a single-thread writer.

Use with caution: pausing and unpausing takes some time. Additionally, blocks that are compressed at the moment will finish compressing, but will not be written. All other blocks in the queue will not be compressed nor written.

To compress and write all remaining blocks you can call flush before calling pause.

Trait Implementations

Writes a single record.

Finishes the stream, same as std::mem::drop(writer), but can return an error.

Flushes contents.

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.