Derive Macro ExampleConfig

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

Derives the ExampleConfig trait for a type. This allows to provide an example for all config parameters.

This macro is intended to be used together with DescribeConfig; it reuses the same attributes. Specifically, for each config field, the default value is assigned from the following sources in the decreasing priority order:

  1. example
  2. default / default_t, including implied ones for Optional fields
  3. From ExampleConfig implementation (only for nested / flattened configs)

ยงSee also