Struct bam::bam_writer::BamWriter [−][src]
pub struct BamWriter<W: Write> { /* fields omitted */ }
Bam writer. Can be created using from_path or using BamWriterBuilder.
Use RecordWriter trait to write records.
Implementations
impl BamWriter<File>
[src]
pub fn build() -> BamWriterBuilder
[src]
Creates a BamWriterBuilder.
pub fn from_path<P: AsRef<Path>>(path: P, header: Header) -> Result<Self>
[src]
Creates a new BamWriter
from a path and header.
impl<W: Write> BamWriter<W>
[src]
pub fn from_stream(stream: W, header: Header) -> Result<Self>
[src]
Creates a new BamWriter
from a stream and header.
pub fn header(&self) -> &Header
[src]
Returns BAM header.
pub fn take_stream(self) -> W
[src]
Consumes the writer and returns inner stream.
pub fn pause(&mut self)
[src]
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
impl<W: Write> RecordWriter for BamWriter<W>
[src]
Auto Trait Implementations
impl<W> !RefUnwindSafe for BamWriter<W>
impl<W> !Send for BamWriter<W>
impl<W> !Sync for BamWriter<W>
impl<W> Unpin for BamWriter<W> where
W: Unpin,
W: Unpin,
impl<W> !UnwindSafe for BamWriter<W>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,