A lib help generate toml example
This crate provides the TomlExample
trait and an accompanying derive macro.
Deriving TomlExample
on a struct will provide to_example
function help generate toml example file base documentation
```rust use toml_example::TomlExample;
struct Config {
/// Config.a should be a number
a: usize,
/// Config.b should be a string
b: String,
/// Optional Config.c is a number
c: Option
// doc is String toml example base on the docstring
// # Config.a should be a number // a = 0 // # Config.b should be a string // b = "" // # Optional Config.c is a number // # c = 0 // # Config.d is a list of number // # d = [ 0, ] ```
#[serde(default = "default_resource")]
for exampleto_toml_example(file_name)