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
sourceimpl Error
impl Error
sourcepub fn from_source(
source: impl Into<Box<dyn Error + Send + Sync + 'static, Global>>
) -> Error
pub fn from_source(
source: impl Into<Box<dyn Error + Send + Sync + 'static, Global>>
) -> Error
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
sourceimpl Error for Error
impl Error for Error
sourcepub fn source(&self) -> Option<&(dyn Error + 'static)>
pub fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more