#[non_exhaustive]pub enum DecodingError {
InvalidBech32(Bech32Error),
InvalidBase64(Base64Error),
InvalidHex(HexError),
InvalidEncoding,
}Expand description
Unified error type wrapping format-specific decoding errors (HexError,
Base64Error, Bech32Error). Always available; variants depend on enabled features.
Unified error type for multi-format decoding operations.
Wraps format-specific errors from hex, base64url, bech32, and bech32m decoders.
Always available; variants depend on enabled features. Like the format-specific
errors it wraps, this type is heap-free, Copy, and build-invariant.
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.
InvalidBech32(Bech32Error)
The input is not valid Bech32.
InvalidBase64(Base64Error)
The input is not valid Base64url.
InvalidHex(HexError)
The input is not valid hexadecimal.
InvalidEncoding
The encoding could not be identified.
Deliberately carries no hint text — free-form diagnostics derived from the input would embed input data in the error value.
Trait Implementations§
Source§impl Clone for DecodingError
impl Clone for DecodingError
Source§fn clone(&self) -> DecodingError
fn clone(&self) -> DecodingError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DecodingError
Source§impl Debug for DecodingError
impl Debug for DecodingError
Source§impl Display for DecodingError
impl Display for DecodingError
impl Eq for DecodingError
Source§impl Error for DecodingError
Available on crate feature std only.
impl Error for DecodingError
Available on crate feature
std only.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 PartialEq for DecodingError
impl PartialEq for DecodingError
Source§fn eq(&self, other: &DecodingError) -> bool
fn eq(&self, other: &DecodingError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DecodingError
Auto Trait Implementations§
impl Freeze for DecodingError
impl RefUnwindSafe for DecodingError
impl Send for DecodingError
impl Sync for DecodingError
impl Unpin for DecodingError
impl UnsafeUnpin for DecodingError
impl UnwindSafe for DecodingError
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