toml

Macro toml

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

Construct a Table from TOML syntax.

let cargo_toml = toml::toml! {
    [package]
    name = "toml"

    [dependencies]
    serde = "1.0"

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

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