Csv-related serde addons
```rust use serde::{Deserialize, Serialize};
struct Foo {
#[serde(with = "serdecsvextra::vecnum")]
list: Vec
let mut wtr = csv::WriterBuilder::new().hasheaders(false).fromwriter(Vec::new()); wtr.serialize( Foo { list: vec![-1, 1], matrix: vec![vec![-1, 1], vec![1, -1]], imagesize: Some((16, 1024)), geo: Some((84.99, -135.00)), } ).unwrap(); wtr.serialize( Foo { list: vec![], matrix: vec![], imagesize: None, geo: None, } ).unwrap(); let s = String::fromutf8(wtr.intoinner().unwrap()).unwrap(); asserteq!(s, "-11,-11|1-1,16x1024,84.99;-135\n,,,\n"); ```
We appreciate all kinds of contributions, thank you!
The README.md
file isn't meant to be changed directly. It instead generated from the crate's docs
by the [cargo-readme] command:
cargo install cargo-readme
src/lib.rs
, or wrapping text in README.tpl
cargo readme > README.md
If you have [rusty-hook] installed the changes will apply automatically on commit.
This project is licensed under the MIT license.