Trait ConfigSourceAdaptor

Source
pub trait ConfigSourceAdaptor {
    // Required method
    fn convert_source(
        self,
        builder: &mut ConfigSourceBuilder<'_>,
    ) -> Result<(), ConfigError>;
}
Expand description

Config source adaptor is an intermediate representation of config source. It can convert to ConfigSource. We have toml, yaml and json values implement this trait.

Config source adaptor examples:

  • Toml format.
  • Yaml format.
  • Json format.
  • Ini format.

Required Methods§

Source

fn convert_source( self, builder: &mut ConfigSourceBuilder<'_>, ) -> Result<(), ConfigError>

Convert adaptor to standard config source.

Implementations on Foreign Types§

Source§

impl ConfigSourceAdaptor for Yaml

Available on crate feature yaml only.
Source§

impl ConfigSourceAdaptor for Ini

Available on crate feature ini only.
Source§

fn convert_source( self, builder: &mut ConfigSourceBuilder<'_>, ) -> Result<(), ConfigError>

Source§

impl ConfigSourceAdaptor for Properties

Available on crate feature ini only.
Source§

fn convert_source( self, builder: &mut ConfigSourceBuilder<'_>, ) -> Result<(), ConfigError>

Implementors§