Struct noodles_sam::io::writer::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A SAM writer builder.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_compression_method(
self,
compression_method: CompressionMethod
) -> Self
pub fn set_compression_method( self, compression_method: CompressionMethod ) -> Self
Sets the compression method.
§Examples
use noodles_sam::io::{writer::Builder, CompressionMethod};
let builder = Builder::default().set_compression_method(CompressionMethod::Bgzf);
sourcepub fn build_from_path<P>(self, dst: P) -> Result<Writer<Box<dyn Write>>>
pub fn build_from_path<P>(self, dst: P) -> Result<Writer<Box<dyn Write>>>
Builds a SAM writer from a path.
If the compression method is not set, it is detected from the path extension.
§Examples
use noodles_sam::io::writer::Builder;
let writer = Builder::default().build_from_path("sample.sam")?;
sourcepub fn build_from_writer<'w, W>(self, writer: W) -> Writer<Box<dyn Write + 'w>>where
W: Write + 'w,
pub fn build_from_writer<'w, W>(self, writer: W) -> Writer<Box<dyn Write + 'w>>where
W: Write + 'w,
Builds a SAM writer from a writer.
If the compression method is not set, no compression is used.
§Examples
use noodles_sam::io::writer::Builder;
let writer = Builder::default().build_from_writer(io::sink());
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more