Derive Macro confu_derive::Confu [−][src]
#[derive(Confu)] { // Attributes available to this derive: #[confu_prefix] #[default] #[protect] #[hide] #[require] }
Expand description
derives confu::Confu
trait methods
See confu crate documentation or the examples in repo for usage examples.
An optional configuration prefix can be specified #[confu_prefix = "PREFIX_]
:
#[derive(Confu)] #[confu_prefix = "PREFIX_"] struct Config { // ... }
following are the field attributes that can be used:
#[default = "default value"]
- specify a default value#[protect]
- displayxxxxxxx
instead of the actual value to protect it#[hide]
- do not display configuration item at all#[require]
- mark configuration item as required