pub enum DiscoveredConfigError {
ProjectConfig(ConfigError),
UserConfig(ConfigError),
}Expand description
Why a config file found by discovery could not be loaded.
The two cases call for different handling. A discovered project file that cannot be parsed is local to one project and a caller may reasonably skip it and keep looking. A broken user config is machine-wide: every project that merges onto it resolves to something other than what the user configured, so it has to be surfaced instead of worked around.
Variants§
ProjectConfig(ConfigError)
The discovered file itself is unusable.
UserConfig(ConfigError)
The discovered file is fine, but the user config it merges on top of is unusable. Only a discovered markdownlint config has such a base.
Trait Implementations§
Source§impl Debug for DiscoveredConfigError
impl Debug for DiscoveredConfigError
Source§impl Display for DiscoveredConfigError
impl Display for DiscoveredConfigError
Source§impl Error for DiscoveredConfigError
impl Error for DiscoveredConfigError
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()
Source§impl From<DiscoveredConfigError> for ConfigError
impl From<DiscoveredConfigError> for ConfigError
Source§fn from(error: DiscoveredConfigError) -> Self
fn from(error: DiscoveredConfigError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DiscoveredConfigError
impl !UnwindSafe for DiscoveredConfigError
impl Freeze for DiscoveredConfigError
impl Send for DiscoveredConfigError
impl Sync for DiscoveredConfigError
impl Unpin for DiscoveredConfigError
impl UnsafeUnpin for DiscoveredConfigError
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