pub struct Builder { /* private fields */ }
Expand description
An indexed FASTA reader builder.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_index(self, index: Index) -> Self
pub fn set_index(self, index: Index) -> Self
Sets an index.
§Examples
use noodles_fasta::{fai, io::indexed_reader::Builder};
let index = fai::Index::default();
let builder = Builder::default().set_index(index);
sourcepub fn build_from_path<P>(
self,
src: P,
) -> Result<IndexedReader<BufReader<File>>>
pub fn build_from_path<P>( self, src: P, ) -> Result<IndexedReader<BufReader<File>>>
Builds an indexed FASTA reader from a path.
§Examples
use noodles_fasta::io::indexed_reader::Builder;
let reader = Builder::default().build_from_path("reference.fa")?;
sourcepub fn build_from_reader<R>(self, reader: R) -> Result<IndexedReader<R>>where
R: BufRead,
pub fn build_from_reader<R>(self, reader: R) -> Result<IndexedReader<R>>where
R: BufRead,
Builds an indexed FASTA reader from a reader.
§Examples
use noodles_fasta::{fai, io::indexed_reader::Builder};
let index = fai::Index::default();
let data = [];
let builder = Builder::default()
.set_index(index)
.build_from_reader(&data[..])?;
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