pub enum Error {
Io(Error),
MachO(String),
Signing(String),
Certificate(String),
InvalidPassword,
MissingCredentials(String),
Config(String),
ProvisioningProfile(String),
Plist(Error),
Zip(ZipError),
Goblin(String),
SymlinkNotSupported,
}Expand description
Error type for zsign operations.
All public functions in this crate return crate::Result<T>, which uses this error type.
Match on variants to handle specific failure cases.
§Examples
use zsign::{ZSign, Error};
let result = ZSign::new().sign_ipa("input.ipa", "output.ipa");
match result {
Ok(()) => println!("Signed successfully"),
Err(Error::MissingCredentials(msg)) => eprintln!("Need credentials: {msg}"),
Err(Error::Io(e)) => eprintln!("IO error: {e}"),
Err(e) => eprintln!("Other error: {e}"),
}Variants§
Io(Error)
I/O operation failed.
Occurs when reading input files, writing output files, or accessing the filesystem during signing operations.
MachO(String)
Invalid or unsupported Mach-O binary format.
The input file is not a valid Mach-O binary or uses an unsupported architecture or format.
Signing(String)
Code signing operation failed.
A general signing failure occurred during signature generation or embedding.
Certificate(String)
Invalid or malformed certificate.
The provided certificate could not be parsed or is not suitable
for code signing. See crate::SigningCredentials for valid formats.
InvalidPassword
Incorrect password for private key or PKCS#12 file.
The password provided to crate::SigningCredentials::from_p12 or
crate::SigningCredentials::from_pem is incorrect.
MissingCredentials(String)
Required credentials not configured.
Signing was attempted without first calling crate::ZSign::credentials.
Config(String)
Invalid builder configuration.
A configuration value is invalid or conflicting options were specified.
ProvisioningProfile(String)
Invalid or malformed provisioning profile.
The .mobileprovision file could not be parsed or does not contain
required entitlements.
Plist(Error)
Property list parsing failed.
Failed to parse Info.plist, entitlements, or other plist data.
Zip(ZipError)
ZIP archive operation failed.
Occurs during IPA extraction or creation. See crate::ipa module.
Goblin(String)
Mach-O binary parsing failed.
Low-level binary parsing error from the goblin library.
SymlinkNotSupported
Symlinks not supported on this platform.
Some platforms do not support symbolic links in app bundles.
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.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.