pub struct EnvLayers { /* private fields */ }Expand description
The layers an EffectiveEnv is resolved from, each a map of variables. Build it with
the with_* methods in any order; resolution applies Layer order.
Implementations§
Source§impl EnvLayers
impl EnvLayers
Sourcepub fn with_plain(self, layer: Layer, vars: &BTreeMap<String, String>) -> Self
pub fn with_plain(self, layer: Layer, vars: &BTreeMap<String, String>) -> Self
Set a plain layer.
Sourcepub fn with_secrets(self, layer: Layer, vars: &BTreeMap<String, String>) -> Self
pub fn with_secrets(self, layer: Layer, vars: &BTreeMap<String, String>) -> Self
Set a layer of secret values (e.g. the catalog’s default credentials).
Sourcepub fn with_vars(self, layer: Layer, vars: &VarSet) -> Self
pub fn with_vars(self, layer: Layer, vars: &VarSet) -> Self
Set a layer from a store VarSet (literals and secret references).
Sourcepub fn with_overlay(self, source: &str, overlay: &Overlay) -> Self
pub fn with_overlay(self, source: &str, overlay: &Overlay) -> Self
Add a source’s overlay, after the sources added before it.
Sourcepub fn resolve(
&self,
providers: &SecretProviders,
) -> Result<EffectiveEnv, SecretError>
pub fn resolve( &self, providers: &SecretProviders, ) -> Result<EffectiveEnv, SecretError>
Resolve every variable: the highest layer setting it wins (a placement key can’t be
overridden), then secret references are resolved with providers. Any reference that
can’t be resolved is an error; nothing falls back. A key some layer holds as a secret
stays masked even where a higher layer sets it as a plain literal.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnvLayers
impl RefUnwindSafe for EnvLayers
impl Send for EnvLayers
impl Sync for EnvLayers
impl Unpin for EnvLayers
impl UnsafeUnpin for EnvLayers
impl UnwindSafe for EnvLayers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more