#[non_exhaustive]pub enum Error {
Show 68 variants
Json(Error),
Architecture,
Os,
Environment,
IoWithPath(PathBuf, Error),
CopyFile(PathBuf, PathBuf, Error),
RenameFile(PathBuf, PathBuf, Error),
Symlink(PathBuf, PathBuf, Error),
Io(Error),
Hex(FromHexError),
HashError,
ZipError(ZipError),
DownloadError(Box<Error>),
UnsupportedBitness,
SignToolNotFound,
UnexpectedTargetTriple(String),
UnsupportedArch(String, String),
MainBinaryNotFound,
Semver(Error),
NonNumericBuildMetadata(Option<String>),
InvalidAppVersion(String),
HandleBarsRenderError(RenderError),
HandleBarsTemplateError(Box<TemplateError>),
NsisFailed(Error),
WixFailed(String, Error),
CreateDmgFailed(Error),
SignToolFailed(Error),
CustomSignCommandFailed(Error),
AppImageScriptFailed(Error),
ParentDirNotFound(PathBuf),
HookCommandFailure(String, String, Error),
HookCommandFailureWithExitCode(String, String, i32),
GlobPatternError(PatternError),
Glob(GlobError),
ImageError(ImageError),
WalkDirError(Error),
StripPrefixError(StripPrefixError),
RelativeToError(RelativeToError),
TimeError(Error),
Plist(Error),
FrameworkNotFound(String),
InvalidFramework {
framework: String,
reason: &'static str,
},
InvalidIconList,
FailedToNotarize,
NotarizeRejected(String),
FailedToParseNotarytoolOutput(String),
ApiKeyMissing {
filename: String,
},
MissingNotarizeAuthVars,
FailedToListKeyChain(Error),
FailedToDecodeCert(Error),
FailedToCreateKeyChain(Error),
FailedToUnlockKeyChain(Error),
FailedToImportCert(Error),
FailedToSetKeychainSettings(Error),
FailedToSetKeyPartitionList(Error),
FailedToRunCodesign(Error),
FailedToRunDitto(Error),
FailedToRunXcrun(Error),
AlreadyExists(PathBuf),
DoesNotExist(PathBuf),
IsNotDirectory(PathBuf),
AppImageSquareIcon,
Base64DecodeError(DecodeError),
Utf8Error(Utf8Error),
Minisign(PError),
SystemTimeError(SystemTimeError),
SigningKeyExists(PathBuf),
FailedToExtractFilename(PathBuf),
}
Expand description
Errors returned by cargo-packager.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Json(Error)
JSON parsing error.
Architecture
Target triple architecture error
Os
Target triple OS error
Environment
Target triple environment error
IoWithPath(PathBuf, Error)
I/O errors with path.
CopyFile(PathBuf, PathBuf, Error)
I/O copy file errors.
RenameFile(PathBuf, PathBuf, Error)
I/O rename file errors.
Symlink(PathBuf, PathBuf, Error)
I/O symlink file errors.
Io(Error)
I/O errors.
Hex(FromHexError)
Hex de/encoding errors.
HashError
Failed to validate downloaded file hash.
ZipError(ZipError)
Zip error.
DownloadError(Box<Error>)
Zip error.
UnsupportedBitness
Unsupported OS bitness.
SignToolNotFound
Windows SignTool not found.
UnexpectedTargetTriple(String)
Unexpected target triple.
UnsupportedArch(String, String)
Unsupported architecture.
MainBinaryNotFound
Could not find the main binary in list of provided binaries.
Semver(Error)
Semver parsing error
NonNumericBuildMetadata(Option<String>)
Non-numeric build metadata in app version.
InvalidAppVersion(String)
Invalid app version when building crate::PackageFormat::Wix
HandleBarsRenderError(RenderError)
Handlebars render error.
HandleBarsTemplateError(Box<TemplateError>)
Handlebars template error.
NsisFailed(Error)
Nsis error
WixFailed(String, Error)
Nsis error
CreateDmgFailed(Error)
create-dmg script error
SignToolFailed(Error)
signtool.exe error
CustomSignCommandFailed(Error)
Custom signing command error
AppImageScriptFailed(Error)
bundle_appimage script error
ParentDirNotFound(PathBuf)
Failed to get parent directory of a path
HookCommandFailure(String, String, Error)
A hook, for example beforePackagaingCommand
, has failed.
HookCommandFailureWithExitCode(String, String, i32)
A hook, for example beforePackagaingCommand
, has failed with an exit code.
GlobPatternError(PatternError)
Glob pattern error.
Glob(GlobError)
Glob error.
ImageError(ImageError)
Image crate errors.
WalkDirError(Error)
walkdir crate errors.
StripPrefixError(StripPrefixError)
Path prefix strip error.
RelativeToError(RelativeToError)
Relative paths errors
TimeError(Error)
Time error.
Plist(Error)
Plist error.
FrameworkNotFound(String)
Framework not found.
InvalidFramework
Invalid framework.
InvalidIconList
Invalid icons.
FailedToNotarize
Failed to notarize.
NotarizeRejected(String)
Rejected on notarize.
FailedToParseNotarytoolOutput(String)
Failed to parse notarytool output.
ApiKeyMissing
Failed to find API key file.
MissingNotarizeAuthVars
Missing notarize environment variables.
FailedToListKeyChain(Error)
Failed to list keychains
FailedToDecodeCert(Error)
Failed to decode certficate as base64
FailedToCreateKeyChain(Error)
Failed to create keychain.
FailedToUnlockKeyChain(Error)
Failed to create keychain.
FailedToImportCert(Error)
Failed to import certificate.
FailedToSetKeychainSettings(Error)
Failed to set keychain settings.
FailedToSetKeyPartitionList(Error)
Failed to set key partition list.
FailedToRunCodesign(Error)
Failed to run codesign utility.
FailedToRunDitto(Error)
Failed to run ditto utility.
FailedToRunXcrun(Error)
Failed to run xcrun utility.
AlreadyExists(PathBuf)
Path already exists.
DoesNotExist(PathBuf)
Path does not exist.
IsNotDirectory(PathBuf)
Path is not a directory.
AppImageSquareIcon
Could not find a square icon to use as AppImage icon
Base64DecodeError(DecodeError)
Base64 decoding error.
Utf8Error(Utf8Error)
Utf8 parsing error.
Minisign(PError)
minisign errors.
SystemTimeError(SystemTimeError)
System time errors.
SigningKeyExists(PathBuf)
Signing keys generation error.
FailedToExtractFilename(PathBuf)
Failed to extract external binary filename
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)>
1.81.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Box<TemplateError>> for Error
impl From<Box<TemplateError>> for Error
source§fn from(source: Box<TemplateError>) -> Self
fn from(source: Box<TemplateError>) -> Self
source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
source§impl From<FromHexError> for Error
impl From<FromHexError> for Error
source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
source§impl From<ImageError> for Error
impl From<ImageError> for Error
source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
source§impl From<PatternError> for Error
impl From<PatternError> for Error
source§fn from(source: PatternError) -> Self
fn from(source: PatternError) -> Self
source§impl From<RelativeToError> for Error
impl From<RelativeToError> for Error
source§fn from(source: RelativeToError) -> Self
fn from(source: RelativeToError) -> Self
source§impl From<RenderError> for Error
impl From<RenderError> for Error
source§fn from(source: RenderError) -> Self
fn from(source: RenderError) -> Self
source§impl From<StripPrefixError> for Error
impl From<StripPrefixError> for Error
source§fn from(source: StripPrefixError) -> Self
fn from(source: StripPrefixError) -> Self
source§impl From<SystemTimeError> for Error
impl From<SystemTimeError> for Error
source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
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
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