Macro toml::toml

source ยท
macro_rules! toml {
    ($($toml:tt)+) => { ... };
}
Expand description

Construct a Table from TOML syntax.

let cargo_toml = toml::toml! {
    [package]
    name = "toml"
    version = "0.4.5"
    authors = ["Alex Crichton <alex@alexcrichton.com>"]

    [badges]
    travis-ci = { repository = "alexcrichton/toml-rs" }

    [dependencies]
    serde = "1.0"

    [dev-dependencies]
    serde_derive = "1.0"
    serde_json = "1.0"
};

println!("{:#?}", cargo_toml);