pub trait ValueSource: Send + Sync {
// Required method
fn env(&self, name: &str) -> Option<String>;
// Provided methods
fn command(&self, _command: &str, _cached: bool) -> Option<String> { ... }
fn now_unix_seconds(&self) -> i64 { ... }
}Expand description
Hosts choose which environment values and commands the runtime may access. Commands are disabled by default; the library never reads process env itself.
Required Methods§
Provided Methods§
fn command(&self, _command: &str, _cached: bool) -> Option<String>
fn now_unix_seconds(&self) -> i64
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".