pub struct Writer { /* private fields */ }
Expand description
A VCF/BCF writer.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn from_path<P: AsRef<Path>>(
path: P,
header: &Header,
uncompressed: bool,
format: Format,
) -> Result<Self>
pub fn from_path<P: AsRef<Path>>( path: P, header: &Header, uncompressed: bool, format: Format, ) -> Result<Self>
Create a new writer that writes to the given path.
§Arguments
path
- the pathheader
- header definition to useuncompressed
- disable compressionvcf
- write VCF instead of BCF
Sourcepub fn from_url(
url: &Url,
header: &Header,
uncompressed: bool,
format: Format,
) -> Result<Self>
pub fn from_url( url: &Url, header: &Header, uncompressed: bool, format: Format, ) -> Result<Self>
Create a new writer from a URL.
§Arguments
url
- the URLheader
- header definition to useuncompressed
- disable compressionvcf
- write VCF instead of BCF
Sourcepub fn from_stdout(
header: &Header,
uncompressed: bool,
format: Format,
) -> Result<Self>
pub fn from_stdout( header: &Header, uncompressed: bool, format: Format, ) -> Result<Self>
Create a new writer to stdout.
§Arguments
header
- header definition to useuncompressed
- disable compressionvcf
- write VCF instead of BCF
Sourcepub fn header(&self) -> &HeaderView
pub fn header(&self) -> &HeaderView
Obtain reference to the lightweight HeaderView
of the BCF header.
Sourcepub fn empty_record(&self) -> Record
pub fn empty_record(&self) -> Record
Create empty record for writing to this writer.
This record can then be reused multiple times.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl !Sync for Writer
impl Unpin for Writer
impl UnwindSafe for Writer
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