#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("Unspecified failure")]
UnspecifiedFailure,
#[error("No acceptable signatures found")]
NoSignature,
#[error("Asymmetric algorithm unsupported")]
UnsupportedAsymmetricAlgo,
#[error("Certificate not encryption-capable")]
CertCannotEncrypt,
#[error("Key not signing-capable")]
KeyCannotSign,
#[error("Missing required argument")]
MissingArg,
#[error("Incomplete verification instructions")]
IncompleteVerification,
#[error("Unable to decrypt")]
CannotDecrypt,
#[error("Non-UTF-8 or otherwise unreliable password")]
PasswordNotHumanReadable,
#[error("Unsupported option")]
UnsupportedOption,
#[error("Invalid data type")]
BadData,
#[error("Non-text input where text expected")]
ExpectedText,
#[error("Output file already exists")]
OutputExists,
#[error("Input file does not exist")]
MissingInput,
#[error("A KEY input is protected with a password and unlocking failed")]
KeyIsProtected,
#[error("A indirect input parameter is a special designator matches file")]
AmbiguousInput,
#[error("Options were supplied that are incompatible with each other")]
IncompatibleOptions,
#[error("Operation not implemented")]
NotImplemented,
#[error("Profile not supported")]
UnsupportedProfile,
#[error("The primary key of a KEYS object is too weak or revoked")]
PrimaryKeyBad,
#[error("The CERTS object has no matching User ID")]
CertUseridNoMatch,
#[error(transparent)]
IoError(#[from] std::io::Error),
}
#[derive(thiserror::Error, Debug)]
#[error("Invalid argument: {}", _0)]
pub struct ParseError(pub String);