#[non_exhaustive]pub enum Error {
ErrorReadingEnvironmentVariable {
name: String,
error: VarError,
},
ErrorParsingEnvironmentVariableAsToml {
name: String,
},
ErrorReadingFile {
path: PathBuf,
error: Error,
},
ErrorParsingTomlFile {
path: PathBuf,
error: Error,
},
CannotParseTomlDotEnvFile {
key: String,
path: PathBuf,
advice: String,
},
ErrorParsingTomlDotEnvFileKey {
name: String,
path: PathBuf,
error: Error,
},
ErrorParsingEnvironmentVariableAsConfig {
name: String,
value: String,
error: Error,
},
ErrorParsingEnvironmentVariableAsConfigOrFile {
name: String,
value: String,
error: Error,
},
UnexpectedTomlDotEnvFileFormat {
path: PathBuf,
value: Value,
},
ErrorParsingMergedToml {
source: ConfigSource,
error: Error,
},
ErrorMerging {
from: ConfigSource,
into: ConfigSource,
error: Error,
},
InvalidTomlKey(String),
}Expand description
An error that occurs while initializing configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ErrorReadingEnvironmentVariable
Error reading environment variable.
ErrorParsingEnvironmentVariableAsToml
Error parsing an environment variable as valid TOML.
ErrorReadingFile
Error reading TOML file.
ErrorParsingTomlFile
Error parsing TOML file.
CannotParseTomlDotEnvFile
Cannot parse a table in the .toml.env file.
ErrorParsingTomlDotEnvFileKey
Fields
Error parsing envirnment variable
ErrorParsingEnvironmentVariableAsConfig
Fields
Error parsing an environment variable as the config.
ErrorParsingEnvironmentVariableAsConfigOrFile
Fields
Either there was an error parsing the environment variable as the config, or if the value is a filename, it does not exist.
UnexpectedTomlDotEnvFileFormat
Fields
Error parsing file as .env.toml format.
ErrorParsingMergedToml
Error parsing merged configuration.
ErrorMerging
Fields
§
from: ConfigSourceError merging from this source.
§
into: ConfigSourceError merging into this source.
Error merging configurations.
InvalidTomlKey(String)
Invalid TOML key.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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