Struct Patch
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;
let doc = toml_example;
// 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
Will do later
- use structure doc for example header
- handle Vec
- nesting structure
- use
#[serde(default = "default_resource")]for example - function to write example file,
to_toml_example(file_name)