Skip to content

easonkamander/dbf_reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBF Reader

A streaming parser for .dbf files, written in Rust. Extracts deserialized records one at a time from anything implementing std::io::Read, without having to allocate space to store the entire document.

Usage

use serde::Deserialize;
use chrono::NaiveDate;

#[derive(Deserialize)]
struct Record {
    my_field_1: f32,
    my_field_2: String,
    my_field_3: NaiveDate,
}

fn iterate<R: std::io::Read>(file: R) -> dbf_reader::Result<()> {
    let mut document = dbf_reader::from_file(file)?;

    for record in document.records() {
        let record: Record = record?;
        // process a record
    }

    Ok(())
}

About

A streaming parser for .dbf files, written in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%