Skip to main content

Config

Trait Config 

Source
pub trait Config {
    type ConfigT: Default + Send + 'static;

    // Required method
    fn parse_main_config_file(
        data: String,
    ) -> Result<Self::ConfigT, Box<dyn Error>>;

    // Provided method
    fn parse_supplemental_config_file(
        _file_path: PathBuf,
        _data: String,
    ) -> Result<Self::ConfigT, Box<dyn Error>> { ... }
}
Expand description

Application configuration parser.

Required Associated Types§

Source

type ConfigT: Default + Send + 'static

Parsed configuration type used by the application.

Required Methods§

Source

fn parse_main_config_file(data: String) -> Result<Self::ConfigT, Box<dyn Error>>

Parse the main configuration file.

Provided Methods§

Source

fn parse_supplemental_config_file( _file_path: PathBuf, _data: String, ) -> Result<Self::ConfigT, Box<dyn Error>>

Parse a supplemental configuration file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§