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()
Auto Trait Implementations§
impl Freeze for LoadError
impl !RefUnwindSafe for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl !UnwindSafe for LoadError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more