odx-core 0.0.1

Domain types, exit codes and IO traits shared by the odx crates
1
2
3
4
5
6
7
8
9
/// Read access to environment variables.
///
/// Library code asks for variables through this trait (for example token
/// lookups such as `GITHUB_TOKEN`), so tests never depend on the real
/// process environment.
pub trait Env: Send + Sync {
    /// The value of `key`, or `None` when it is unset or not valid Unicode.
    fn var(&self, key: &str) -> Option<String>;
}