A library to generate toml text with clear options and comments
Example 1: toml text from definition (all examples see tests)
rust code:
use ;
use ;
use TomlInput;
/// comment `Test`
/// comment `TestEnum`
let text = schema_to_string.unwrap;
toml text:
# comment `Test`
# comment `a`
= 0
# comment `A`
#!b = "A"
# comment `B`
= "B"
Example 2: toml text from value
rust code:
/// comment `Test`
/// comment `TestEnum`
let test = Test ;
let text = test.into_string.unwrap;
toml text:
# comment `Test`
# comment `a`
= 0
# b = "A" | "B"
# comment `B`
= "B"
Example 3: enum tuple
rust code:
/// comment `Test`
/// comment `TestEnum`
let test = Test ;
let text = test.into_string.unwrap;
toml text:
# comment `Test`
# comment `a`
= 0
# comment `A`
#!b = "A"
# comment `B`
= { = "test B" }