pub struct Reader<R: Read> { /* private fields */ }
Expand description
Reads a FASTA-formatted source (e.g. a file).
Implementations§
source§impl<R: Read> Reader<R>
impl<R: Read> Reader<R>
sourcepub fn new(reader: R, unwrap: bool) -> Self
pub fn new(reader: R, unwrap: bool) -> Self
Creates a Reader from the given Read (e.g. a file).
When unwrap is true
, the reader will unwrap the input sequences by
removing newlines between the sequence lines
(each Record.sequence) will only have one item.
When unwrap is false
, each record line will be a new item in
the Record.sequence vec.
sourcepub fn read_record(&mut self) -> Result<Option<Record>>
pub fn read_record(&mut self) -> Result<Option<Record>>
Reads the next record from the FASTA file.
Auto Trait Implementations§
impl<R> !RefUnwindSafe for Reader<R>
impl<R> Send for Reader<R>where
R: Send,
impl<R> Sync for Reader<R>where
R: Sync,
impl<R> Unpin for Reader<R>where
R: Unpin,
impl<R> !UnwindSafe for Reader<R>
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