Expand description
A macro for parsing tables into Rust structs.
use serde::Deserialize;
use serde_table::serde_table;
#[derive(Deserialize)]
struct Person {
name: String,
age: u32,
city: String,
}
let people: Vec<Person> = serde_table! {
name age city
John 30 NewYork
Jane 25 LosAngeles
}.unwrap();§Advanced Usage
While serde_table ought to do the right thing in general,
you can use serde_table_expr if you need to avoid the automatic quoting of bare variable-names (identifiers).
§Installation
Add the following to your Cargo.toml:
[dependencies]
serde_table = "0.1.0"Macros§
Enums§
- Serde
Table Error - Errors that can occur when using
serde_table.
Functions§
- parse
- Given a
Vec<Vec<String>>, parse it into aVec<T>>.