Skip to main content

LoaderOps

Trait LoaderOps 

Source
pub trait LoaderOps: Send + Sync {
    // Required methods
    fn load_section_value(&self, key: &str) -> Result<Value, ConfigError>;
    fn validate_dirs(&self) -> Result<(), ConfigError>;
    fn load_feature_raw(&self, key: &str) -> Result<RawFeature, ConfigError>;
}
Expand description

Type-erased view of a config source used internally by crate::DefaultLoader.

Non-generic so it can be boxed as a trait object. All deserialization of the returned toml::Value is performed by the caller.

Required Methods§

Source

fn load_section_value(&self, key: &str) -> Result<Value, ConfigError>

Load the raw merged TOML value at key from all configured directories.

Source

fn validate_dirs(&self) -> Result<(), ConfigError>

Validate all configured directories.

Source

fn load_feature_raw(&self, key: &str) -> Result<RawFeature, ConfigError>

Load the raw feature data for key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§