pub trait Layer {
// Required methods
fn source(&self) -> SourceKind;
fn load(&self, ctx: &LayerCtx) -> Result<LayerOutput, LayerError>;
}Expand description
A source of configuration values.
Required Methods§
Sourcefn source(&self) -> SourceKind
fn source(&self) -> SourceKind
Which kind of place this reads. Used by the scope check and reported by explain.
Sourcefn load(&self, ctx: &LayerCtx) -> Result<LayerOutput, LayerError>
fn load(&self, ctx: &LayerCtx) -> Result<LayerOutput, LayerError>
Everything this layer has to say, in one pass.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".