use debug_ignore::DebugIgnore; use envconfig::Envconfig; use lazy_static::lazy_static; #[derive(Envconfig, Debug)] pub struct Config { #[envconfig(from = "FIDDLE_DB_URL")] pub db_url: DebugIgnore, #[envconfig(from = "FIDDLE_DATA_DIR")] pub data_dir: String, #[envconfig(from = "FIDDLE_AUTO_PRUNE_SLEEP")] pub auto_prune_sleep: u64, #[envconfig(from = "FIDDLE_TAMPER_SLEEP")] pub tamper_sleep: u64, } lazy_static! { pub static ref CONFIG: Config = Config::init_from_env().unwrap(); }