ConfigValueDecoder

Derive Macro ConfigValueDecoder 

Source
#[derive(ConfigValueDecoder)]
Expand description

Derives the ConfigValueDecoder trait for simple enums without fields.

This macro automatically implements the ConfigValueDecoder trait for enums, enabling them to be parsed from environment variable string values. It performs case-insensitive matching of the environment variable value against variant names.

  • Can only be used on enums or newtype structs
  • All variants of enum must be unit variants (no fields)
  • Matching is case-insensitive (variant names are converted to lowercase for comparison)