pub fn load() -> Result<Self> {
        let mut cfg = Config::parse();
        if !cfg.config_file.is_empty() {
            cfg = Self::load_from_toml(cfg.config_file.as_str())?;
        }

        // Self::load_from_env(&mut cfg);
        cfg.check()?;
        Ok(cfg)
    }
/// First load configs from args.
/// If config file is not empty, e.g: `-c xx.toml`, reload config from the
/// file. Prefer to use environment variables in cloud native
/// deployment. Override configs base on environment variables.
First load configs from args.
If config file is not empty, e.g: `-c xx.toml`, reload config from the
file. Prefer to use environment variables in cloud native
deployment. Override configs base on environment variables.
First load configs from args . If config file is not empty e . g : ` - c xx . toml ` reload config from the file . Prefer to use environment variables in cloud native deployment . Override configs base on environment variables .
pub fn load() -> Result<Self> {
        let mut cfg = Config::parse();
        if !cfg.config_file.is_empty() {
            cfg = Self::load_from_toml(cfg.config_file.as_str())?;
        }
        // Self::load_from_env(&mut cfg);
        cfg.check()?;
        Ok(cfg)
    }
pub fn load ( ) -> Result < Self > { let mut cfg = Config :: parse ( ) ; if ! cfg . config_file . is_empty ( ) { cfg = Self :: load_from_toml ( cfg . config_file . as_str ( ) ) ? ; } // Self::load_from_env(&mut cfg); cfg . check ( ) ? ; Ok ( cfg ) }
First load configs from args.
First load configs from args .