[][src]Struct needletail::parser::SequenceRecord

pub struct SequenceRecord<'a> { /* fields omitted */ }

A FASTA or FASTQ record

Implementations

impl<'a> SequenceRecord<'a>[src]

pub fn format(&self) -> Format[src]

Returns the format of the record

pub fn id(&self) -> &[u8][src]

Returns the id of the record

pub fn raw_seq(&self) -> &[u8][src]

Returns the raw sequence of the record. Only matters for FASTA since it can contain newlines.

pub fn seq(&self) -> Cow<[u8]>[src]

Returns the cleaned up sequence of the record. For FASTQ it is the same as raw_seq but for FASTA it is raw_seq minus all the \r\n

pub fn qual(&self) -> Option<&[u8]>[src]

Returns the quality line if there is one. Always None for FASTA and Some for FASTQ, even if the quality line is empty.

pub fn all(&self) -> &[u8][src]

Returns the full sequence, including line endings. This doesn't include a trailing newline.

pub fn num_bases(&self) -> usize[src]

Return the number of bases in the sequence, computed efficiently.

pub fn start_line_number(&self) -> u64[src]

Return the line number in the file of the start of the sequence

pub fn line_ending(&self) -> LineEnding[src]

Which line ending is this record using?

pub fn write(
    &self,
    writer: &mut dyn Write,
    forced_line_ending: Option<LineEnding>
) -> Result<(), ParseError>
[src]

Write record back to a Write instance. By default it will use the original line ending but you can force it to use another one.

Trait Implementations

impl<'a> Clone for SequenceRecord<'a>[src]

impl<'a> Debug for SequenceRecord<'a>[src]

impl<'a> Sequence<'a> for SequenceRecord<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SequenceRecord<'a>

impl<'a> Send for SequenceRecord<'a>

impl<'a> Sync for SequenceRecord<'a>

impl<'a> Unpin for SequenceRecord<'a>

impl<'a> UnwindSafe for SequenceRecord<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.