pub fn load() -> WsssConfig {
    let file_cfg = load_env_file()
      .or_else(|| load_etc())
      .or_else(|| load_local_file())
      .unwrap_or(TomlWsssConfig::default());

    let env_cfg = TomlWsssConfig::parse_env();

    let cmdline_cfg = TomlWsssConfig::parse_cmdline();

    return TomlWsssConfig::merge(
      cmdline_cfg,
      TomlWsssConfig::merge(
        env_cfg,
        TomlWsssConfig::merge(file_cfg, WsssConfig::default()),
      ),
    )
    .into();
  }
/// Try and load configuration from several well known sources
/// command line arguments, and env vars
///
/// First we try and load a toml config file
/// specified by the environment variable `WSSS_CONF_FILE`.
///
/// If not found, we then try loading `/etc/wsss/wsss_conf.toml`.
///
/// If not found we then try and load a wsss_conf.toml from the
/// directory wsss was launched from.
///
/// Only the contents of the first file found will be loaded
/// and then modified by env and commandline variables
///
/// Then for any settings loaded from the file, we override them
/// with any env vars we find, then override with any commandline
/// parameters
Try and load configuration from several well known sources
command line arguments, and env vars

First we try and load a toml config file
specified by the environment variable `WSSS_CONF_FILE`.

If not found, we then try loading `/etc/wsss/wsss_conf.toml`.

If not found we then try and load a wsss_conf.toml from the
directory wsss was launched from.

Only the contents of the first file found will be loaded
and then modified by env and commandline variables

Then for any settings loaded from the file, we override them
with any env vars we find, then override with any commandline
parameters
Try and load configuration from several well known sources command line arguments and env vars First we try and load a toml config file specified by the environment variable ` WSSS_CONF_FILE ` . If not found we then try loading ` / etc / wsss / wsss_conf . toml ` . If not found we then try and load a wsss_conf . toml from the directory wsss was launched from . Only the contents of the first file found will be loaded and then modified by env and commandline variables Then for any settings loaded from the file we override them with any env vars we find then override with any commandline parameters
pub fn load() -> WsssConfig {
    let file_cfg = load_env_file()
      .or_else(|| load_etc())
      .or_else(|| load_local_file())
      .unwrap_or(TomlWsssConfig::default());
    let env_cfg = TomlWsssConfig::parse_env();
    let cmdline_cfg = TomlWsssConfig::parse_cmdline();
    return TomlWsssConfig::merge(
      cmdline_cfg,
      TomlWsssConfig::merge(
        env_cfg,
        TomlWsssConfig::merge(file_cfg, WsssConfig::default()),
      ),
    )
    .into();
  }
pub fn load ( ) -> WsssConfig { let file_cfg = load_env_file ( ) . or_else ( | | load_etc ( ) ) . or_else ( | | load_local_file ( ) ) . unwrap_or ( TomlWsssConfig :: default ( ) ) ; let env_cfg = TomlWsssConfig :: parse_env ( ) ; let cmdline_cfg = TomlWsssConfig :: parse_cmdline ( ) ; return TomlWsssConfig :: merge ( cmdline_cfg , TomlWsssConfig :: merge ( env_cfg , TomlWsssConfig :: merge ( file_cfg , WsssConfig :: default ( ) ) , ) , ) . into ( ) ; }
Try and load configuration from several well known sources
command line arguments, and env vars
Try and load configuration from several well known sources command line arguments and env vars