[][src]Struct seq_io::fasta::RefRecord

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

A FASTA record that borrows data from a buffer.

Implementations

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

pub fn seq_lines(&self) -> SeqLines<'_>

Notable traits for SeqLines<'a>

impl<'a> Iterator for SeqLines<'a> type Item = &'a [u8];
[src]

Return an iterator over all sequence lines in the data

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

Returns the number of sequence lines. Equivalent to self.seq_lines().len()

pub fn full_seq(&self) -> Cow<'_, [u8]>[src]

Returns the full sequence. If the sequence consists of a single line, then the sequence will be borrowed from the underlying buffer (equivalent to calling RefRecord::seq()). If there are multiple lines, an owned copy will be created (equivalent to RefRecord::owned_seq()).

pub fn owned_seq(&self) -> Vec<u8>[src]

Returns the sequence as owned Vec. Note: This function must be called in order to obtain a sequence that does not contain line endings (as returned by seq())

pub fn to_owned_record(&self) -> OwnedRecord[src]

Creates an owned copy of the record.

pub fn write_unchanged<W: Write>(&self, writer: W) -> Result<()>[src]

Writes a record to the given io::Write instance by just writing the unmodified input, which is faster than RefRecord::write

Trait Implementations

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

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

impl<'a> Record for RefRecord<'a>[src]

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

Return the FASTA sequence as byte slice. Note that this method of RefRecord returns the raw sequence, which may contain line breaks. Use seq_lines() to iterate over all lines without breaks, or use full_seq() to access the whole sequence at once.

Auto Trait Implementations

impl<'a> RefUnwindSafe for RefRecord<'a>

impl<'a> Send for RefRecord<'a>

impl<'a> Sync for RefRecord<'a>

impl<'a> Unpin for RefRecord<'a>

impl<'a> UnwindSafe for RefRecord<'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> Pointable for T

type Init = T

The type for initializers.

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.