[−][src]Trait seq_io::fastx::dynamic::FastxReader
Trait for FASTX reading.
Provides the same methods as individual Reader
types, but in contrast of
returning / operating on different RefRecord
/ RecordSet
/
RecordsIter
... types, types from the fastx
module are used, allowing
for FASTX functionality with dynamic dispatch.
Required methods
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
Returns the next fastx::RefRecord
, if any.
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
Updates a fastx::RecordSet
with new data.
fn format(&self) -> Option<SeqFormat>
Returns the sequence format (SeqFormat::FASTA
or SeqFormat::FASTQ
)
if known. For FASTA / FASTQ readers, the format is known in the
beginning already, for FASTX readers, a first record has to be returned
successfully (without error) before the format can be known.
If not able to call this method in the middle of a parsing process
because of borrowing issues, there is also
has_quality()
method, which can be called on individual sequence records and
essentially gives the same information.
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
Returns a borrowed iterator over all records.
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
Returns an iterator over all records like FastxReader::records()
,
but with the difference that it owns the underlying reader.
fn position_fastx(&self) -> Position
Returns the position of the current record (found by the previous call
to next_fastx()
). Equivalent to the position()
method
of individual readers. Useful with seek_fastx()
.
Trait Implementations
impl<'a, R, P, S> RecordSetReader for &'a mut (dyn FastxReader<R, P, S> + Send) where
R: Read,
P: BufPolicy + Send,
S: PositionStore,
[src]
R: Read,
P: BufPolicy + Send,
S: PositionStore,
Implementors
impl<R, P, S> FastxReader<R, P, S> for seq_io::fasta::single_line::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
fn position_fastx(&self) -> Position
[src]
impl<R, P, S> FastxReader<R, P, S> for seq_io::fasta::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
fn position_fastx(&self) -> Position
[src]
impl<R, P, S> FastxReader<R, P, S> for seq_io::fastq::multiline::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
fn position_fastx(&self) -> Position
[src]
impl<R, P, S> FastxReader<R, P, S> for seq_io::fastq::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
fn position_fastx(&self) -> Position
[src]
impl<R, P, S> FastxReader<R, P, S> for seq_io::fastx::multiline_qual::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,
fn position_fastx(&self) -> Position
[src]
impl<R, P, S> FastxReader<R, P, S> for seq_io::fastx::Reader<R, P, S> where
R: Read,
P: BufPolicy,
S: PositionStore,
[src]
R: Read,
P: BufPolicy,
S: PositionStore,
fn next_fastx(&mut self) -> Option<Result<RefRecord<'_, S>>>
[src]
fn read_record_set_fastx(
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
[src]
&mut self,
record_set: &mut RecordSet<S>
) -> Result<bool>
fn format(&self) -> Option<SeqFormat>
[src]
fn fastx_records(&mut self) -> RecordsIter<'_, R, P, S>ⓘNotable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
[src]
Notable traits for RecordsIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIter<'a, R, P, S> where
P: BufPolicy + 'a,
R: Read + 'a,
S: PositionStore, type Item = Result<OwnedRecord>;
fn into_fastx_records<'a>(self) -> RecordsIntoIter<'a, R, P, S>ⓘNotable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
where
R: 'a,
P: 'a,
S: 'a,
[src]
Notable traits for RecordsIntoIter<'a, R, P, S>
impl<'a, R, P, S> Iterator for RecordsIntoIter<'a, R, P, S> where
P: BufPolicy,
R: Read,
S: PositionStore, type Item = Result<OwnedRecord>;
R: 'a,
P: 'a,
S: 'a,