#[non_exhaustive]pub enum SignError {
Sign,
NotASignature,
Malformed,
Unrecoverable,
BadV(u8),
WrongSigner {
expected: Address,
recovered: Address,
},
NotAKey,
}Expand description
Why a signature could not be made, read or checked, or a key could not be read.
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.
Sign
The key failed to sign the digest.
NotASignature
The text is not 0x and 65 bytes of hex.
Malformed
r and s do not form a valid secp256k1 signature.
Unrecoverable
No public key recovers from the signature and digest.
BadV(u8)
The recovery byte v is not 0, 1, 27 or 28.
WrongSigner
The signature recovered to another address than the one required.
Fields
NotAKey
The bytes are not a valid secp256k1 private key.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.