pub enum ConfigError {
Io(Error),
Parse(String),
Validation(String),
MissingProperty(String),
TypeConversion {
key: String,
expected: String,
value: String,
},
FileNotFound(PathBuf),
InvalidFormat(String),
CycleDetected(String),
OverrideNotAllowed(String),
UnknownProfile(String),
Deserialize(String),
}Expand description
Configuration error type 配置错误类型
Equivalent to Spring’s ConfigurationPropertiesException.
等价于Spring的ConfigurationPropertiesException。
Variants§
Io(Error)
I/O error I/O错误
Parse(String)
Parse error 解析错误
Validation(String)
Validation error 验证错误
MissingProperty(String)
Missing required property 缺少必需属性
TypeConversion
Type conversion error 类型转换错误
Fields
FileNotFound(PathBuf)
File not found 文件未找到
InvalidFormat(String)
Invalid format 无效格式
CycleDetected(String)
Cycle detected in configuration 配置中检测到循环
OverrideNotAllowed(String)
Override not allowed 不允许覆盖
UnknownProfile(String)
Unknown profile 未知配置文件
Deserialize(String)
Deserialize error 反序列化错误
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
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl From<ConfigError> for ConfigError
impl From<ConfigError> for ConfigError
Source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigError
impl !UnwindSafe for ConfigError
impl Freeze for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
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