EnvSource

Type Alias EnvSource 

Source
pub type EnvSource = StringSource<EnvLookup>;
Expand description

A source which uses values from the environment.

See the crate and StringSource documentation for more details.

§Examples:

use serde_vars::EnvSource;

let mut source = EnvSource::default();

let mut de = serde_json::Deserializer::from_str(r#""${MY_VAR}""#);
let r: String = serde_vars::deserialize(&mut de, &mut source).unwrap();
assert_eq!(r, "some secret value");

Aliased Type§

pub struct EnvSource { /* private fields */ }