#[non_exhaustive]pub enum Base32Error {
InvalidBase32,
#[non_exhaustive] InvalidLength {
expected: usize,
got: usize,
},
}Expand description
Errors from Base32 (RFC 4648 §6, uppercase, unpadded) decoding. Variant shapes are identical in debug and release builds; only numeric length metadata is carried. Errors produced when decoding Base32 (RFC 4648 §6, uppercase, unpadded) strings.
Requires feature encoding-base32.
Variant shapes are identical in debug and release builds; only numeric length metadata is carried.
The std::error::Error impl requires the std feature. Without it the
type still exists and still implements Display, but
it is not an Error, so ? into Box<dyn Error> and std::io::Error::other
will not compile. This is an MSRV consequence, not a policy: core::error::Error
needs Rust 1.81 and this line targets 1.70. On 0.9.x the impl is
unconditional and available in no_std.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidBase32
The string is not valid Base32 (wrong alphabet, wrong case, padding, or an impossible length).
#[non_exhaustive]InvalidLength
The decoded payload length does not match the target type’s length.
Fields
This variant is marked as non-exhaustive
Trait Implementations§
Source§impl Clone for Base32Error
impl Clone for Base32Error
Source§fn clone(&self) -> Base32Error
fn clone(&self) -> Base32Error
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Base32Error
Source§impl Debug for Base32Error
impl Debug for Base32Error
Source§impl Display for Base32Error
Available on crate feature encoding-base32 only.
impl Display for Base32Error
encoding-base32 only.impl Eq for Base32Error
Source§impl Error for Base32Error
Available on crate features encoding-base32 and std only.
impl Error for Base32Error
encoding-base32 and std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()