pub enum Error {
Show 40 variants
Io(Error),
InvalidKeyLength,
UnsupportedPkAlgo,
UnsupportedKdfAlgo,
FileTooShort,
FileTooLarge,
InvalidCommentHeader,
InvalidCommentUtf8,
PasswordMismatch,
PasswordReadFailed,
IncorrectPassphrase,
MissingPubKey,
KeyMismatch,
VerifyFailed,
AutolocateFailed(PathBuf, Box<Error>),
InvalidKeyName,
InvalidPath,
CheckFailed,
ChecksumMismatch(String),
ChecksumParseFailed(String),
UnsupportedHashAlgo(String),
Overflow,
Base64Decode(Error),
Arg(Error),
InvalidSignatureLength,
MissingGzipHeader,
MissingGzipSignature,
MissingSignatureNewline,
KeyringDisabled,
InvalidKeyId,
RequiredArg(&'static str),
MissingMode,
InvalidPasswordUtf8,
InvalidSignatureUtf8,
WeakPassword(Option<String>),
Keyring(KeyError),
Crypto(Error),
Rng(OsError),
Nix(Errno),
Landlock(RulesetError),
}Expand description
Custom Error type for Signify operations.
Variants§
Io(Error)
I/O error.
InvalidKeyLength
Key length is invalid.
UnsupportedPkAlgo
Unsupported public key algorithm (expected Ed).
UnsupportedKdfAlgo
Unsupported KDF algorithm (expected BK).
FileTooShort
File is too short.
FileTooLarge
File is too large (exceeds 1GB limit for embedded verification).
InvalidCommentHeader
Invalid comment header (expected “untrusted comment: …”).
InvalidCommentUtf8
Invalid comment (not utf8)
PasswordMismatch
Password confirmation failed.
PasswordReadFailed
Failed to read password.
IncorrectPassphrase
Incorrect passphrase (checksum mismatch).
MissingPubKey
Missing public key (no comment or autolocate failed).
KeyMismatch
Key fingerprint mismatch.
VerifyFailed
Signature verification failed.
AutolocateFailed(PathBuf, Box<Error>)
Autolocate failed to find the key.
InvalidKeyName
Key name compliance check failed.
InvalidPath
Path does not contain a filename.
CheckFailed
Checksum verification failed.
ChecksumMismatch(String)
Checksum mismatch for a specific file.
ChecksumParseFailed(String)
Unable to parse checksum line.
UnsupportedHashAlgo(String)
Unsupported hash algorithm.
Overflow
Integer overflow.
Base64Decode(Error)
Base64 decoding failed.
Arg(Error)
Argument parsing error.
InvalidSignatureLength
Invalid signature length.
MissingGzipHeader
Missing Gzip header.
MissingGzipSignature
Missing signature in Gzip comment.
MissingSignatureNewline
Missing newline in signature.
KeyringDisabled
Keyring support is disabled.
InvalidKeyId
Invalid key ID.
RequiredArg(&'static str)
Required argument missing.
MissingMode
Mode not specified.
InvalidPasswordUtf8
Invalid UTF-8 in password.
InvalidSignatureUtf8
Invalid UTF-8 in signature.
WeakPassword(Option<String>)
Password is too weak.
Keyring(KeyError)
Keyring error.
Crypto(Error)
Cryptographic error (e.g., invalid key format).
Rng(OsError)
RNG error.
Nix(Errno)
UNIX error.
Landlock(RulesetError)
Landlock 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<RulesetError> for Error
Available on Linux or Android only.
impl From<RulesetError> for Error
Source§fn from(err: RulesetError) -> Self
fn from(err: RulesetError) -> 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> 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