Skip to main content

ConfigDoc

Derive Macro ConfigDoc 

Source
#[derive(ConfigDoc)]
{
    // Attributes available to this derive:
    #[config_example]
}
Expand description

Derive macro to extract doc comments and generate TOML config with comments

This macro generates field_docs() and for AppConfig, also generates to_toml_with_comments() that creates a fully documented TOML config.

Documentation is extracted from:

  • Struct-level doc comments (for section headers)
  • Field-level doc comments (for field descriptions)