[go: up one dir, main page]

[][src]Function dbase::write_to

pub fn write_to<T: Write>(records: &Vec<Record>, dest: T) -> Result<T, Error>

Writes the records to the dest

Examples

use std::io::Cursor;

let mut fst = dbase::Record::new();
fst.insert("Name".to_string(), dbase::FieldValue::Character("The Flesh PrevailsFallujah".to_string()));
fst.insert("Price".to_string(), dbase::FieldValue::Numeric(9.99));
let records = vec![fst];

let cursor = Cursor::new(Vec::<u8>::new());
let cursor = dbase::write_to(&records, cursor).unwrap();