#[non_exhaustive]pub enum Base64Error {
InvalidBase64,
#[non_exhaustive] InvalidLength {
expected: usize,
got: usize,
},
}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.
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.
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
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Trait Implementations§
Source§impl Clone for Base64Error
impl Clone for Base64Error
Source§fn clone(&self) -> Base64Error
fn clone(&self) -> Base64Error
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 Base64Error
Source§impl Debug for Base64Error
impl Debug for Base64Error
Source§impl Display for Base64Error
Available on crate feature encoding-base64 only.
impl Display for Base64Error
Available on crate feature
encoding-base64 only.impl Eq for Base64Error
Source§impl Error for Base64Error
Available on crate features encoding-base64 and std only.
impl Error for Base64Error
Available on crate features
encoding-base64 and std only.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()
Source§impl PartialEq for Base64Error
impl PartialEq for Base64Error
impl StructuralPartialEq for Base64Error
Auto Trait Implementations§
impl Freeze for Base64Error
impl RefUnwindSafe for Base64Error
impl Send for Base64Error
impl Sync for Base64Error
impl Unpin for Base64Error
impl UnsafeUnpin for Base64Error
impl UnwindSafe for Base64Error
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