#[non_exhaustive]pub enum ErrorKind {
Missing,
Mismatch {
expected: Cow<'static, str>,
found: String,
},
Invalid(String),
UnknownKey {
suggestion: Option<String>,
},
UnknownVariant {
found: String,
expected: &'static [&'static str],
},
Syntax {
format: &'static str,
message: String,
},
Unsupported(String),
Io {
path: PathBuf,
source: Error,
},
Cli(String),
Help(String),
Multiple(Vec<ConfigError>),
}Expand description
What went wrong.
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.
Missing
A required value is absent.
Mismatch
A value cannot be converted into the expected type.
Invalid(String)
A validator rejected the value.
UnknownKey
A key that no field declares.
UnknownVariant
An enum value that matches no variant.
Fields
Syntax
The input is not valid in its format.
Unsupported(String)
A feature or format that is unavailable.
Io
A file could not be read.
Cli(String)
Bad command-line input.
Help(String)
The user asked for the help text.
Multiple(Vec<ConfigError>)
Several independent errors.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ErrorKind
impl !UnwindSafe for ErrorKind
impl Freeze for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
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