#[non_exhaustive]pub enum ToBech32Error {
Encode(EncodeError),
Tlv(TlvError),
}Expand description
Error produced when encoding a value to its NIP-19 representation.
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.
Encode(EncodeError)
bech32 rejected the encoding (typically: HRP + data is too long for
the underlying checksum algorithm).
Tlv(TlvError)
A TLV value exceeded its 255-byte cap (relay URL, identifier, …).
Trait Implementations§
Source§impl Debug for ToBech32Error
impl Debug for ToBech32Error
Source§impl Display for ToBech32Error
impl Display for ToBech32Error
Source§impl Error for ToBech32Error
impl Error for ToBech32Error
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<EncodeError> for ToBech32Error
impl From<EncodeError> for ToBech32Error
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<TlvError> for ToBech32Error
impl From<TlvError> for ToBech32Error
Source§impl From<ToBech32Error> for Nip21Error
impl From<ToBech32Error> for Nip21Error
Source§fn from(source: ToBech32Error) -> Self
fn from(source: ToBech32Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ToBech32Error
impl RefUnwindSafe for ToBech32Error
impl Send for ToBech32Error
impl Sync for ToBech32Error
impl Unpin for ToBech32Error
impl UnsafeUnpin for ToBech32Error
impl UnwindSafe for ToBech32Error
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