#[non_exhaustive]pub enum DecodeErrorKind {
InvalidInput,
InvalidLength,
InvalidByte,
InvalidPadding,
InvalidLineWrap,
OutputTooSmall,
StagingTooSmall,
}Expand description
Redacted decoding error class.
This type intentionally omits input-derived bytes and indexes so callers can log error classes without logging secret-adjacent input content.
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.
InvalidInput
The encoded input is malformed, but the decoder intentionally does not disclose a more specific error class.
InvalidLength
The encoded input length is impossible for the selected padding policy.
InvalidByte
A byte is not valid for the selected alphabet.
InvalidPadding
Padding is missing, misplaced, or non-canonical.
InvalidLineWrap
Line wrapping is missing, misplaced, or uses the wrong line ending.
OutputTooSmall
The output buffer is too small.
StagingTooSmall
The caller-provided constant-time staging buffer is too small.
Implementations§
Trait Implementations§
Source§impl Clone for DecodeErrorKind
impl Clone for DecodeErrorKind
Source§fn clone(&self) -> DecodeErrorKind
fn clone(&self) -> DecodeErrorKind
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 DecodeErrorKind
Source§impl Debug for DecodeErrorKind
impl Debug for DecodeErrorKind
Source§impl Display for DecodeErrorKind
impl Display for DecodeErrorKind
impl Eq for DecodeErrorKind
Source§impl PartialEq for DecodeErrorKind
impl PartialEq for DecodeErrorKind
Source§fn eq(&self, other: &DecodeErrorKind) -> bool
fn eq(&self, other: &DecodeErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DecodeErrorKind
Auto Trait Implementations§
impl Freeze for DecodeErrorKind
impl RefUnwindSafe for DecodeErrorKind
impl Send for DecodeErrorKind
impl Sync for DecodeErrorKind
impl Unpin for DecodeErrorKind
impl UnsafeUnpin for DecodeErrorKind
impl UnwindSafe for DecodeErrorKind
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