pub struct TakConfigLayer { /* private fields */ }Expand description
tak.toml as a settings layer.
Not usage’s FileLayer: tak.toml is tak’s general config file, so most of
what it holds — [bench] above all — is not a setting, and scanning the file
would warn about every one of those keys. This reads the other way around:
it iterates the registry’s source("config", ...) bindings and looks each
dotted key up in the parsed TOML, so a key nothing declares is simply not
looked at.
A missing tak.toml is fine. A syntax-broken one — or a declared key
holding the wrong type — is an error rather than a warning: the file may
carry [env] settings that change what gets scrubbed from a subject’s
environment, and quietly applying a weaker filter than the project asked
for is not a good failure.
Implementations§
Trait Implementations§
Source§impl Layer for TakConfigLayer
impl Layer for TakConfigLayer
Source§fn source(&self) -> SourceKind
fn source(&self) -> SourceKind
Which kind of place this reads. Used by the scope check and reported by
explain.Source§fn load(&self, ctx: &LayerCtx) -> Result<LayerOutput, LayerError>
fn load(&self, ctx: &LayerCtx) -> Result<LayerOutput, LayerError>
Everything this layer has to say, in one pass.
Auto Trait Implementations§
impl Freeze for TakConfigLayer
impl RefUnwindSafe for TakConfigLayer
impl Send for TakConfigLayer
impl Sync for TakConfigLayer
impl Unpin for TakConfigLayer
impl UnsafeUnpin for TakConfigLayer
impl UnwindSafe for TakConfigLayer
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