pub trait ConfigSource: Send {
    fn name(&self) -> &str;
    fn load(
        &self,
        builder: &mut ConfigSourceBuilder<'_>
    ) -> Result<(), ConfigError>; fn allow_refresh(&self) -> bool { ... } fn refreshable(&self) -> Result<bool, ConfigError> { ... } }
Expand description

Config source.

Config source examples:

  • Load from programming.
  • Load from environment.
  • Load from file.
  • Load from network.

Required Methods

Config source name.

Load config source.

Provided Methods

If this config source can be refreshed.

Check if config source is refreshable.

Implementor should notice that everytime this method is called, the refreshable state must be reset to false.

Implementors