[][src]Crate entab

entab is a library to parse different "record-formatted" file formats into tabular form.

An example reading a FASTA file and extracting all the ids:

use std::fs::File;
use entab::buffer::ReadBuffer;
use entab::readers::fasta::{FastaReader, FastaRecord};

let file = Box::new(File::open("./tests/data/sequence.fasta")?);
let buffer = ReadBuffer::new(file)?;
let mut reader = FastaReader::new(buffer, ())?;
while let Some(FastaRecord { id, .. }) = reader.next()? {
    println!("{}", id);
}

Re-exports

pub use utils::error::EtError;

Modules

buffer

The buffer interface that underlies the file readers

compression

Generic file decompression

filetype

File format inference

readers

Parsers for specific file formats

record

Record and abstract record reading

utils

Miscellanous utility functions and error handling

Macros

impl_reader

Generates a ...Reader struct for the associated state-based file parsers along with the matching RecordReader for that struct.

impl_record

Autogenerates the conversion from a struct into the matching Vec of headers and the corresponding Vec of Values to allow decomposing these raw structs into a common Record system that allows abstracting over different file formats.