[][src]Struct bam::bam_writer::BamWriterBuilder

pub struct BamWriterBuilder { /* fields omitted */ }

Builder of the BamWriter.

Methods

impl BamWriterBuilder[src]

pub fn new() -> Self[src]

pub fn header(&mut self, header: Header) -> &mut Self[src]

Specifies BAM header.

pub fn write_header(&mut self, write: bool) -> &mut Self[src]

The option to write or skip header when creating the BAM writer (writing by default).

pub fn compression_level(&mut self, level: u8) -> &mut Self[src]

Specify compression level (6 by default).

pub fn from_path<P: AsRef<Path>>(
    &mut self,
    path: P
) -> Result<BamWriter<BufWriter<File>>>
[src]

Creates a BAM writer from a file. If you want to use the same instance of BamWriterBuilder again, you need to specify header again.

Panics if the header was not specified.

pub fn from_stream<W: Write>(&mut self, stream: W) -> Result<BamWriter<W>>[src]

Creates a BAM writer from stream. Preferably the stream should be wrapped in a buffer writer, such as BufWriter.

If you want to use the same instance of BamWriterBuilder again, you need to specify header again.

Panics if the header was not specified.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]