#[non_exhaustive]pub enum SignError {
UnsupportedCharacter,
EmptyTag,
ZeroNonce,
AuxRandNotUsed,
}Expand description
The reasons signing can fail.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsupportedCharacter
The content or a tag contains a control character outside the set
NIP-01 escapes by name; see
SignedEvent.
EmptyTag
A tag has no elements; NIP-01 requires at least one.
ZeroNonce
The BIP-340 nonce derived from this key, message and auxiliary randomness is zero. The probability is negligible; retry with fresh auxiliary randomness.
AuxRandNotUsed
The BIP-340 backend did not take the auxiliary randomness as exactly one 32-byte draw, so no signature is returned rather than one made with substitute auxiliary data. This points at an incompatible dependency version, not at the input; retrying does not help.
Trait Implementations§
impl Copy for SignError
impl Eq for SignError
Source§impl Error for SignError
impl Error for SignError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for SignError
Auto Trait Implementations§
impl Forget for SignError
impl Freeze for SignError
impl Move for SignError
impl RefUnwindSafe for SignError
impl Send for SignError
impl Sync for SignError
impl Unpin for SignError
impl UnsafeUnpin for SignError
impl UnwindSafe for SignError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more