#[non_exhaustive]pub enum DeriveError {
Mnemonic(Error),
Path(String),
Crypto(String),
Input(String),
AddressEncoding(String),
}Expand description
Errors produced by HD derivation, mnemonic handling, and address encoding.
Variants partition failures by domain:
Mnemonic— BIP-39 decode / encode failures.Path— invalid or malformed derivation paths.Crypto— underlying cryptographic primitive failures (HMAC, BIP-32 / SLIP-10 key math, PBKDF2, BLAKE2, secp256k1, etc.).Input— caller-supplied inputs that fail validation (word count, hex encoding, empty password, prefix expansion, index overflow, unknown derivation style).AddressEncoding— chain-specific address encoding failures (Bech32 / Bech32m HRP, base58check, base32, …).
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.
Mnemonic(Error)
BIP-39 mnemonic decoding / encoding failed.
Path(String)
Derivation path is malformed or unsupported.
Crypto(String)
A cryptographic primitive (HMAC, BIP-32 / SLIP-10, PBKDF2, BLAKE2, secp256k1, …) failed.
Input(String)
Caller-supplied input failed validation (word count, hex, index, unknown derivation style, …).
AddressEncoding(String)
Chain-specific address encoding failed (Bech32 / Bech32m, base58, base32, …).
Trait Implementations§
Source§impl Debug for DeriveError
impl Debug for DeriveError
Source§impl Display for DeriveError
impl Display for DeriveError
Source§impl Error for DeriveError
impl Error for DeriveError
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()
Auto Trait Implementations§
impl Freeze for DeriveError
impl RefUnwindSafe for DeriveError
impl Send for DeriveError
impl Sync for DeriveError
impl Unpin for DeriveError
impl UnsafeUnpin for DeriveError
impl UnwindSafe for DeriveError
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