Macro de_conf::bundle_config

source ·
macro_rules! bundle_config {
    ($($name:ident : $type_into:ty : $type_from:ty),*) => { ... };
}
Expand description

Bundles configuration neatly into a single struct.

The most important part is the generated load method which loads the configuration from a file.

It also manages converting into final desired data structure.

  • name is the name of the field in the Configuration struct
  • type_from is the implementor of Config
  • type_into is the final desired data structure must be able to fulfil the TryInto trait