pub enum ErrorCause {
FileRead(Error),
Json(Error),
Json5(Error),
Toml(Error),
FormatNotAllowed {
format: ConfigFormat,
prefer: ConfigFormat,
},
}
Expand description
Cause of a HumusConfigError.
⚠️ Warning: Available variants depend on the enabled feature flags, don’t do exhaustive matching on them in libraries.
Variants§
FileRead(Error)
There was a problem with reading the file itself
Json(Error)
There was a problem while parsing the file as JSON
Json5(Error)
There was a problem while parsing the file as JSON5
Toml(Error)
There was a problem parsing the file as TOML
FormatNotAllowed
The file format was recognized, but isn’t allowed by the settings
Fields
§
format: ConfigFormat
The detected format
§
prefer: ConfigFormat
The format you should prefer instead
Implementations§
Source§impl ErrorCause
impl ErrorCause
Sourcepub fn get_format(&self) -> Option<ConfigFormat>
pub fn get_format(&self) -> Option<ConfigFormat>
Return the format that caused the error
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorCause
impl !RefUnwindSafe for ErrorCause
impl Send for ErrorCause
impl Sync for ErrorCause
impl Unpin for ErrorCause
impl !UnwindSafe for ErrorCause
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