pub enum ConfigError {
Parse(String),
Io(String),
NotFound(String),
Validation {
section: String,
reason: String,
},
}Expand description
Errors returned by config loading and validation operations.
Returned by Loader::load_section, FeatureLoader::load_feature, and
every real LoaderOps implementor. Match on the variant to decide whether
to abort startup or log and continue.
Variants§
Parse(String)
A TOML file could not be parsed.
Io(String)
An I/O or filesystem constraint was violated.
NotFound(String)
No config file was found in any configured directory.
Returned by crate::Loader::load_section when every candidate directory
either does not exist or contains no config file. This usually indicates a
misconfigured config path rather than an intentionally absent section.
Validation
A cross-field or semantic constraint was violated after deserialization.
Returned when a TOML section is present and parses successfully but
fails the post-deserialization validation defined by
OptionalSection::validate_enabled.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()