Struct noodles_vcf::writer::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A BAM 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_vcf::{io::CompressionMethod, writer::Builder};
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 VCF writer from a path.
If the compression method is not set, it is detected from the path extension.
§Examples
use noodles_vcf as vcf;
let writer = vcf::writer::Builder::default().build_from_path("out.vcf")?;
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 VCF writer from a writer.
If the compression method is not set, no compression is used.
§Examples
use noodles_vcf as vcf;
let writer = vcf::writer::Builder::default().build_from_writer(io::sink());
Trait Implementations§
Auto Trait Implementations§
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