pub trait Source<C: HasPartial> {
type Error: Debug;
// Required methods
fn to_partial(self) -> Result<C::Partial, Self::Error>;
fn name(&self) -> String;
}Expand description
The implementor of this trait is a source of configuration. The method Source::to_partial
obtains a single layer of configuration and from a given source.
This trait is mostly used for trait-level type checking so that the Partial::source method
operates as expected. No user is ever expected to call Source::to_partial directly.
Required Associated Types§
Required Methods§
Sourcefn to_partial(self) -> Result<C::Partial, Self::Error>
fn to_partial(self) -> Result<C::Partial, Self::Error>
Obtain a partial layer from Self. Not user facing, but used inside the
Partial::source for type checking.
Sourcefn name(&self) -> String
fn name(&self) -> String
The name that is being printed whenever this layer of configuration is being parsed. If you
came across this method to silence the Sourcing configuration from XXX message, instead
simply override the Partial::source method instead.