Skip to main content

Module error

Module error 

Source
Expand description

Error types Crate-wide error types for crypt_guard.

§Responsibility scope

This module owns the two public error enums — [CryptError] and [SigningErr] — and all their impl blocks. No other module may define a crate-level error; per-operation failures are expressed as variants here.

§Key types exported

  • [CryptError] — primary error type for KEM, AEAD, KDF, and I/O failures.
  • [SigningErr] — digital signature error type (identity preserved via [CryptError::Signing]; not String-flattened).

§Concurrency

[CryptError] is Clone and Send + Sync (io::Error is wrapped in Arc). [SigningErr] is Clone and Send + Sync (ditto).

§Errors

This module produces no errors; it only defines them.

§Examples

use crypt_guard::error::CryptError;
let e = CryptError::new("custom failure");
println!("{}", e);

Enums§

CryptError
Primary error type for all crypt_guard operations.
SigningErr
Digital signature subsystem error type.

Traits§

Zeroize
Trait for securely erasing values from memory.

Derive Macros§

Zeroize
Derive the Zeroize trait.