cargo add baskerville
# mascots.csv
Name,LOC,Species
Ferris,42,Crab
Corro,7,Urchin
use baskerville::{infer_csv_with_options, CsvInput, InferOptions};
fn main() {
let fields = infer_csv_with_options(
CsvInput::Path("mascots.csv"),
&mut InferOptions {
has_headers: true,
..InferOptions::default()
},
)
.unwrap();
println!("{fields}");
}
Output:
╭──────┬─────────┬─────────╮
│ Name │ LOC │ Species │
├──────┼─────────┼─────────┤
│ Text │ Integer │ Text │
│ │ Float │ │
│ │ Text │ │
╰──────┴─────────┴─────────╯
The repo bases versioning from Conventional Commits