Derive Macro blockz::prelude::Configuration [−][src]
#[derive(Configuration)] { // Attributes available to this derive: #[configuration] }
Derive the Configuration trait.
This requires that the struct or enum is Send.
Configuring the implementation is done via the #[configuration]
attribute:
- by default, direct configuration will be implemented, if no other configuration feature is enabled
- direct configuration:
#[configuration(direct)]
- env configuration with no prefix:
#[configuraton(env())]
- env configuration with a prefix:
#[configuraton(env(prefix = "MY_PREFIX"))]
- env configuration with a prefix source:
#[configuraton(env(prefix_source = "MY_SOURCE"))]
The prefix source will be interpreted as an expression that will be used to source the prefix. You can use either constants or functions.
Required available imports: