pub enum AddressError {
InvalidBech32(String),
UnsupportedVersion {
version: u8,
},
WrongPayloadLength {
version: u8,
expected: usize,
actual: usize,
},
UnknownHrp {
hrp: String,
},
InvalidPublicKey {
reason: String,
},
}Expand description
Errors from parsing or encoding BIP 352 Silent Payment addresses.
Variants§
InvalidBech32(String)
Bech32m decoding failure (checksum, character set, or length).
UnsupportedVersion
Address version is unsupported. Version 31 is always rejected (backward-incompatible). Versions 1-30 are forward-compatible (first 66 bytes are read).
WrongPayloadLength
Payload length does not match the expected length for the given version.
UnknownHrp
Human-readable prefix is not recognized (not sp/tsp/sprt).
InvalidPublicKey
A public key in the address payload is invalid.
Trait Implementations§
Source§impl Debug for AddressError
impl Debug for AddressError
Source§impl Display for AddressError
impl Display for AddressError
Source§impl Error for AddressError
impl Error for AddressError
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()
Auto Trait Implementations§
impl Freeze for AddressError
impl RefUnwindSafe for AddressError
impl Send for AddressError
impl Sync for AddressError
impl Unpin for AddressError
impl UnsafeUnpin for AddressError
impl UnwindSafe for AddressError
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