Macro csv_entry

Source
macro_rules! csv_entry {
    ($writer: ident <- $($header:expr),*) => { ... };
}
Expand description

Adds a row to the given csv writer.

§Syntax:

csv_entry!(writer <- one, two, three) Here, one etc are expressions that can be formatted to String.

§Usage:

use make_csv::{csv_start, csv_entry, csv_stop};

let mut wtr = csv_start!("out.csv");
csv_entry!(wtr <- "header_0", "header_1");
csv_entry!(wtr <- 0.0, 1.0);
csv_stop!(wtr);

This will result in the following .csv file:

header_0,header_1
0.0,1.0