logo
pub struct Error { /* private fields */ }
Expand description

Signature errors.

This type is deliberately opaque as to avoid sidechannel leakage which could potentially be used recover signing private keys or forge signatures (e.g. BB’06).

When the std feature is enabled, it impls [std::error::Error] and supports an optional [std::error::Error::source], which can be used by things like remote signers (e.g. HSM, KMS) to report I/O or auth errors.

Implementations

Create a new error with no associated source

Create a new error with an associated source.

NOTE: The “source” should NOT be used to propagate cryptographic errors e.g. signature parsing or verification errors. The intended use cases are for propagating errors related to external signers, e.g. communication/authentication errors with HSMs, KMS, etc.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.