pub enum Error {
Io {
context: &'static str,
source: Error,
},
IoPath {
path: PathBuf,
context: &'static str,
source: Error,
},
NoLintScope {
path: PathBuf,
},
InvalidPathForLintScope {
path: PathBuf,
scope: LintScope,
expected: &'static str,
},
InvalidLintScope {
scope: LintScope,
function: &'static str,
expected: &'static str,
},
InvalidResources {
scope: LintScope,
lint_rule: String,
expected: LintScope,
},
Json {
error: Error,
context: String,
},
BuildInfo(Error),
PackageBuild(Error),
PackageInfo(Error),
SourceInfo(Error),
LintConfig(Error),
}Expand description
Errors that can occur when using alpm-lint.
Variants§
Io
I/O error.
Fields
IoPath
I/O error with additional path info for more context.
Fields
NoLintScope
No lint scope could be automatically detected for a path.
InvalidPathForLintScope
The wrong type of path was provided for a lint scope.
§Example
The LintScope::Package scope expects a directory. If a file is provided, this error
will be thrown.
Fields
InvalidLintScope
An incompatible lint scope has been provided to a function.
Fields
InvalidResources
An incompatible resource of specific scope is provided to a lint rule.
Fields
Json
JSON serialization error.
Fields
BuildInfo(Error)
alpm-buildinfo error.
PackageBuild(Error)
alpm-pkgbuild error.
PackageInfo(Error)
alpm-pkginfo error.
SourceInfo(Error)
alpm-srcinfo error.
LintConfig(Error)
alpm-lint-config error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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