#[non_exhaustive]pub enum Error {
Failed,
}Expand description
Workspace-wide failure type (v0.5 W5).
Every fallible public surface in gmcrypto-core that does not
return Option / bool / subtle::CtOption returns
Result<_, Error>. The single Failed variant is deliberate per
the failure-mode invariant (see SECURITY.md): distinguishing
failure modes leaks information to padding-oracle / invalid-curve /
password-oracle attackers.
Per-module aliases keep the established import paths working:
sm2::Error, pem::Error, pkcs8::Error are type aliases for
this one type. Prior to v0.5 these were separate per-module enums
(SignError, EncryptError, DecryptError, pem::Error,
pkcs8::Error) all with a single Failed variant; v0.5 unifies
them per Q5.16 in docs/v0.5-scope.md.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Failed
The operation failed. No further information is exposed — distinguishing failure modes leaks attacker-useful signal.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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
use the Display impl or to_string()