pub struct Builder { /* private fields */ }
Expand description
A SAM reader 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::{reader::Builder, CompressionMethod};
let builder = Builder::default().set_compression_method(CompressionMethod::Bgzf);
Sourcepub fn build_from_path<P>(self, src: P) -> Result<Reader<Box<dyn BufRead>>>
pub fn build_from_path<P>(self, src: P) -> Result<Reader<Box<dyn BufRead>>>
Builds a SAM reader from a path.
By default, the compression method will be autodetected. This can be overridden by using
Self::set_compression_method
.
§Examples
use noodles_sam::io::reader::Builder;
let reader = Builder::default().build_from_path("sample.sam")?;
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