Struct narwhal_crypto::traits::Error
[−]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
impl Error
impl Error
pub 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
impl Error for Error
impl Error for Error
fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for Twhere
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
fn clear(&mut self)
Completely overwrites this value.
impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere
T: Default,
unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set
to all-bits-zero. Read more