Struct noodles::fasta::fai::Reader[][src]

pub struct Reader<R> { /* fields omitted */ }
Expand description

A FASTA index reader.

Implementations

Creates a FASTA index reader.

Examples

use noodles_fasta::fai;
let data = b"sq0\t13\t5\t80\t81\nsq1\t21\t19\t80\t81\n";
let mut reader = fai::Reader::new(&data[..]);

Reads a FASTA index.

The position of the stream is expected to be at the start or at the start of a record.

Examples

use noodles_fasta::fai;

let data = b"sq0\t13\t5\t80\t81\nsq1\t21\t19\t80\t81\n";
let mut reader = fai::Reader::new(&data[..]);
let index = reader.read_index()?;

assert_eq!(index, vec![
    fai::Record::new(String::from("sq0"), 13, 5, 80, 81),
    fai::Record::new(String::from("sq1"), 21, 19, 80, 81),
]);

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.