#[non_exhaustive]pub enum ConfigError {
FileNotFound(PathBuf),
FileIo {
path: PathBuf,
message: String,
source: Error,
},
FileParse {
path: PathBuf,
message: String,
source: Box<Error>,
},
}Expand description
All errors that may occur while loading a voxora 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.
FileNotFound(PathBuf)
The requested config file does not exist. Callers that treat a missing file as “just use the defaults” should match on this variant instead of ignoring every error.
FileIo
The config file exists but could not be read.
Fields
FileParse
The config file was read but is not valid TOML, or contains a key that does not belong to the schema.
The parser error is boxed: toml::de::Error alone is larger
than the whole rest of this enum, and every Result in the
crate would pay for it.
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()
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