#[non_exhaustive]pub enum Base64Error {
InvalidBase64,
#[non_exhaustive] InvalidLength {
expected: usize,
got: usize,
},
}encoding-base64 only.Expand description
Errors from Base64url decoding. Variant shapes are identical in debug and release builds; only numeric length metadata is carried. Errors produced when decoding base64url strings.
Requires feature encoding-base64.
Variant shapes are identical in debug and release builds; only numeric length metadata is carried.
Implements core::error::Error unconditionally — no std feature is
required, and the impl is present in no_std builds. (On the 0.8 line
this impl is std-gated, because core::error::Error needs Rust 1.81 and
that branch targets 1.70. Code that must build against both should not
assume the trait is available without std.)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidBase64
The string is not valid base64url.
#[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 Base64Error
impl Clone for Base64Error
impl Copy for Base64Error
Source§impl Debug for Base64Error
impl Debug for Base64Error
Source§impl Display for Base64Error
impl Display for Base64Error
impl Eq for Base64Error
Source§impl Error for Base64Error
impl Error for Base64Error
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()