pub enum Error {
Show 26 variants
InvalidKeyLength {
expected: usize,
actual: usize,
},
InvalidDataLength {
expected: usize,
actual: usize,
},
InvalidHex(String),
InvalidBase58(String),
InvalidBase64(String),
CryptoError(String),
InvalidSignature(String),
InvalidPublicKey(String),
InvalidPrivateKey(String),
PointAtInfinity,
DecryptionFailed,
InvalidNonce(String),
InvalidTag,
InvalidUtf8(String),
ReaderUnderflow {
needed: usize,
available: usize,
},
InvalidChecksum,
ScriptParseError(String),
ScriptExecutionError(String),
InvalidOpcode(u8),
DisabledOpcode(u8),
StackUnderflow,
StackOverflow,
Bip276Error(String),
InvalidAddress(String),
InvalidAddressLength(String),
UnsupportedAddress(String),
}Expand description
Main error type for the BSV SDK.
Variants§
InvalidKeyLength
Invalid key length for cryptographic operations.
InvalidDataLength
Invalid data length for cryptographic operations.
InvalidHex(String)
Invalid hex string.
InvalidBase58(String)
Invalid base58 string.
InvalidBase64(String)
Invalid base64 string.
CryptoError(String)
Cryptographic operation failed.
InvalidSignature(String)
Invalid signature.
InvalidPublicKey(String)
Invalid public key.
InvalidPrivateKey(String)
Invalid private key.
PointAtInfinity
Point at infinity (invalid for most operations).
DecryptionFailed
Decryption failed.
InvalidNonce(String)
Invalid nonce.
InvalidTag
Invalid tag (for authenticated encryption).
InvalidUtf8(String)
Invalid UTF-8 sequence.
ReaderUnderflow
Reader underflow (not enough bytes to read).
InvalidChecksum
Invalid checksum.
ScriptParseError(String)
Script parse error.
ScriptExecutionError(String)
Script execution error.
InvalidOpcode(u8)
Invalid opcode.
DisabledOpcode(u8)
Disabled opcode.
StackUnderflow
Stack underflow.
StackOverflow
Stack overflow.
Bip276Error(String)
BIP-276 encoding/decoding error.
InvalidAddress(String)
Invalid address.
InvalidAddressLength(String)
Invalid address length.
UnsupportedAddress(String)
Unsupported address type.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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