cargo_packager

Enum Error

source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

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.

Fields

§framework: String

Framework name

§reason: &'static str

Reason why this framework is invalid

§

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.

Fields

§filename: String

Filename of the API key.

§

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 Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.81.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.81.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
source§

impl From<Box<Error>> for Error

source§

fn from(source: Box<Error>) -> Self

Converts to this type from the input type.
source§

impl From<Box<TemplateError>> for Error

source§

fn from(source: Box<TemplateError>) -> Self

Converts to this type from the input type.
source§

impl From<DecodeError> for Error

source§

fn from(source: DecodeError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Self

Converts to this type from the input type.
source§

impl From<FromHexError> for Error

source§

fn from(source: FromHexError) -> Self

Converts to this type from the input type.
source§

impl From<GlobError> for Error

source§

fn from(source: GlobError) -> Self

Converts to this type from the input type.
source§

impl From<ImageError> for Error

source§

fn from(source: ImageError) -> Self

Converts to this type from the input type.
source§

impl From<PError> for Error

source§

fn from(source: PError) -> Self

Converts to this type from the input type.
source§

impl From<PatternError> for Error

source§

fn from(source: PatternError) -> Self

Converts to this type from the input type.
source§

impl From<RelativeToError> for Error

source§

fn from(source: RelativeToError) -> Self

Converts to this type from the input type.
source§

impl From<RenderError> for Error

source§

fn from(source: RenderError) -> Self

Converts to this type from the input type.
source§

impl From<StripPrefixError> for Error

source§

fn from(source: StripPrefixError) -> Self

Converts to this type from the input type.
source§

impl From<SystemTimeError> for Error

source§

fn from(source: SystemTimeError) -> Self

Converts to this type from the input type.
source§

impl From<Utf8Error> for Error

source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.
source§

impl From<ZipError> for Error

source§

fn from(source: ZipError) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more