pub enum ConfigError {
IoError(Error),
MissingComponent(String),
YamlSyntax(ScanError),
YamlEmit(EmitError),
Error(Box<dyn StdError>),
}Expand description
When loading a YAML file there maybe missing required components or bad YAML. This error type allows these errors to be propegated.
Variants§
IoError(Error)
A problem finding or reading the config file.
MissingComponent(String)
When a yaml file is missing a required component. Will return the missing component.
YamlSyntax(ScanError)
When a YAML file encounters a parsing error.
YamlEmit(EmitError)
When there is a problem emitting yaml.
Error(Box<dyn StdError>)
Handle a Box
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 description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl From<EmitError> for ConfigError
impl From<EmitError> for ConfigError
Source§fn from(err: EmitError) -> ConfigError
fn from(err: EmitError) -> ConfigError
Converts to this type from the input type.
Source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Source§fn from(err: Error) -> ConfigError
fn from(err: Error) -> ConfigError
Converts to this type from the input type.
Source§impl From<ScanError> for ConfigError
impl From<ScanError> for ConfigError
Source§fn from(err: ScanError) -> ConfigError
fn from(err: ScanError) -> ConfigError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConfigError
impl !RefUnwindSafe for ConfigError
impl !Send for ConfigError
impl !Sync for ConfigError
impl Unpin for ConfigError
impl !UnwindSafe 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