mesa 0.43.18

A library for Shasta
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use config::{Config, File, FileFormat};

/// Reads configuration file with manta parameters
pub fn get_configuration(config_path: &str) -> Config {
    let config = Config::builder()
        .add_source(File::new(config_path, FileFormat::Toml))
        .build();

    match config {
        Err(_) => {
            eprintln!("Configuration missing or wrong format!. Exit");
            std::process::exit(1);
        }
        Ok(config_content) => config_content,
    }
}