pub enum PackageError {
Show 15 variants
ManifestNotFound {
path: String,
},
ParseError(Error),
Io(Error),
BuildFailed(String),
SignatureNotFound {
path: String,
},
SignatureInvalid {
path: String,
},
ArchiveError(String),
InvalidArchive(String),
InvalidManifest(String),
PathTraversal {
entry: String,
},
AbsolutePath {
entry: String,
},
SymlinkRejected {
entry: String,
},
HardlinkRejected {
entry: String,
},
SizeLimitExceeded {
limit: u64,
actual: u64,
},
TooManyEntries {
limit: u32,
},
}Expand description
Errors that can occur when loading a package manifest.
Variants§
ManifestNotFound
The package.toml file was not found in the given directory.
ParseError(Error)
The manifest file could not be parsed as valid TOML or failed
schema validation (the [metadata] section didn’t match M).
Io(Error)
An I/O error occurred reading the manifest file.
BuildFailed(String)
Build failed.
SignatureNotFound
Package signature file not found.
SignatureInvalid
Package signature is invalid (no trusted key verified it).
ArchiveError(String)
An error occurred creating or reading an archive.
InvalidArchive(String)
The archive does not contain a valid package.
InvalidManifest(String)
Manifest passed serde parsing but failed cross-section validation
(e.g. runtime = "python" without a [python] section, or unknown
runtime value).
PathTraversal
Archive entry contains a .. component that would escape dest.
AbsolutePath
Archive entry has an absolute path (root or drive prefix).
SymlinkRejected
Archive contains a symlink entry, which could be used to overwrite
arbitrary files outside dest on a follow-up write.
HardlinkRejected
Archive contains a hardlink entry, same threat model as symlinks.
SizeLimitExceeded
Cumulative decompressed size exceeded the configured cap.
TooManyEntries
Archive contains more entries than the configured cap allows.
Trait Implementations§
Source§impl Debug for PackageError
impl Debug for PackageError
Source§impl Display for PackageError
impl Display for PackageError
Source§impl Error for PackageError
impl Error for PackageError
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()