Toml Example
A lib help generate toml example
Introduction
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
Quick Example
use TomlExample;
/// Config is to arrange something or change the controls on a computer or other device
/// so that it can be used in a particular way
to_toml_example; // write example to a file
let example = toml_example;
Toml example base on the doc string of each field
# Config is to arrange something or change the controls on a computer or other device
# so that it can be used in a particular way
# Config.a should be a number
= 0
# Config.b should be a string
= ""
# Optional Config.c is a number
# c = 0
# Config.d is a list of number
# d = [ 0, ]
# Config.e should be a number
= 7
# Config.f should be a string
= "default"
Will do later
- nesting structure