Skip to main content

Config

Trait Config 

Source
pub trait Config: Send + Sync {
    // Required method
    fn get(&self, key: &str) -> Option<String>;
}
Expand description

Read-only key/value configuration, resolved per runtime from environment variables and secrets (Workers Env) or the process environment.

Keys are SCREAMING_SNAKE; module keys are prefixed with the module name, e.g. EMAIL_SIGNUP_CONFIRM_TTL_DAYS.

Required Methods§

Source

fn get(&self, key: &str) -> Option<String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§