Skip to main content

FastxRecord

Trait FastxRecord 

Source
pub trait FastxRecord: Clone {
    // Required methods
    fn get_index(&self) -> u32;
    fn get_sequence(&self) -> &str;
    fn subsequence(&self, start: usize, end: usize) -> Self;
    fn format_output(&self, name: &str) -> String;
}
Expand description

Common interface for sequence record types stored in FastxRecords.

Required Methods§

Source

fn get_index(&self) -> u32

Returns the base-0 index of this record in the source file.

Source

fn get_sequence(&self) -> &str

Returns the sequence string.

Source

fn subsequence(&self, start: usize, end: usize) -> Self

Returns a new record containing the subsequence between start (inclusive) and end (exclusive).

Source

fn format_output(&self, name: &str) -> String

Returns the record formatted for writing to a file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§