pub enum LoadError {
NoSources,
MissingModules(Vec<String>),
DiagnosticThreshold,
Source(Box<dyn Error + Send + Sync>),
Io(Error),
}Expand description
Errors returned by Loader::load and the
free function load.
All variants carry enough context for callers to present useful error
messages. The Display implementation produces
human-readable text for each case.
Variants§
NoSources
MissingModules(Vec<String>)
One or more explicitly requested modules were not found after resolution.
The contained Vec lists the missing module names.
DiagnosticThreshold
A diagnostic exceeded the configured fail-at severity threshold.
See DiagnosticConfig for threshold configuration.
Source(Box<dyn Error + Send + Sync>)
A Source implementation returned a custom error.
Use LoadError::from_source to construct this variant from an
arbitrary error type.
Io(Error)
An I/O error occurred while reading MIB files from disk.
Implementations§
Source§impl LoadError
impl LoadError
Sourcepub fn from_source(err: impl Error + Send + Sync + 'static) -> Self
pub fn from_source(err: impl Error + Send + Sync + 'static) -> Self
Wrap an arbitrary error as a LoadError::Source.
Useful for custom Source implementations that
need to return domain-specific errors through the loading pipeline.
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
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()