pub enum ConfigError {
Read {
path: PathBuf,
message: String,
},
Syntax {
path: PathBuf,
message: String,
},
Setting {
key: String,
message: String,
next: String,
},
}Expand description
A configuration this product will not run on.
Every variant names the thing a user has to go and change and says what to change it to. That is the whole point: an unknown field, a bad value, an unknown plugin name and an unusable source name are all usage errors here, never settings that get quietly dropped.
Variants§
Read
A configuration document exists but could not be read.
Syntax
A configuration document is not valid YAML.
Fields
Setting
One setting is unknown, or its value is not usable.
key is the dotted path a user can search their configuration for and is also
the path the environment-variable and --set spellings are derived from, so
one name locates the problem at whichever layer set it.
Implementations§
Trait Implementations§
Source§impl Clone for ConfigError
impl Clone for ConfigError
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
impl Eq for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<&ConfigError> for Failure
impl From<&ConfigError> for Failure
Source§fn from(error: &ConfigError) -> Self
fn from(error: &ConfigError) -> Self
A configuration this product will not run on. No source caused it — a plugin refusing its own block is refused here, at load, before any source is built.
Source§impl PartialEq for ConfigError
impl PartialEq for ConfigError
impl StructuralPartialEq for ConfigError
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.