#[non_exhaustive]pub enum SignatureError {
BadLength(usize),
BadRecoveryId(u8),
Hex(FromHexError),
Ecdsa(Error),
}Expand description
Errors produced when constructing a RecoverableSignature.
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.
BadLength(usize)
The signature byte slice was not exactly 65 bytes (r || s || v).
BadRecoveryId(u8)
The recovery id byte was not 0 or 1 (after normalising 27/28).
Hex(FromHexError)
Hexadecimal signature decoding failed.
Ecdsa(Error)
The underlying ECDSA library rejected the signature scalars.
Trait Implementations§
Source§impl Debug for SignatureError
impl Debug for SignatureError
Source§impl Display for SignatureError
impl Display for SignatureError
Source§impl Error for SignatureError
impl Error for SignatureError
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()
Source§impl From<Error> for SignatureError
impl From<Error> for SignatureError
Source§impl From<FromHexError> for SignatureError
impl From<FromHexError> for SignatureError
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SignatureError
impl !UnwindSafe for SignatureError
impl Freeze for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl UnsafeUnpin for SignatureError
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
BadLength: 15 bytesBadRecoveryId: 1 byteHex: 23 bytesEcdsa: 23 bytes