Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Comments¶
- The serde_yaml crate is the best tool for parsing YAML in Rust.
Parse TOML Files in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Read and Write CSV Files in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Tips and Traps¶
By defaut,
csv::Reader
requires headers.When the csv crate is used together with the serde crate for deserialization, CSV files to be parsed have to be strictly well formatted. For example, the headers in CSV files have to match the defintion in the serde struct. Otherwise, the code will panic with an error of "missing fields".