Skip to main content

register

Function register 

Source
pub fn register<T>(key: &str, effective: &T)
where T: Serialize + Default + 'static,
Expand description

Register a config section in the global registry.

Called automatically by [Config::unmarshal_key_registered]. Can also be called manually for sections that don’t go through the cascade.

Requires T: Serialize + Default so we can capture both the default and effective values as JSON for reflection.