#[non_exhaustive]pub enum InputError {
InvalidByte {
index: usize,
byte: u8,
},
InvalidPadding {
index: usize,
},
NonCanonicalTrailingBits {
index: usize,
},
InvalidLength,
TruncatedInput {
index: usize,
},
TrailingData {
index: usize,
},
InvalidLineWrap {
index: usize,
},
}Expand description
Detailed ordinary malformed-input diagnostic.
Debug is redacted. Display includes ordinary input diagnostics and must
not be logged for secret-bearing input.
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.
InvalidByte
A byte is outside the selected alphabet.
InvalidPadding
Padding became invalid at this original absolute source index.
NonCanonicalTrailingBits
Unused trailing bits are non-zero.
InvalidLength
The encoded length cannot represent a complete value.
TruncatedInput
Finishing found an incomplete encoded quantum.
TrailingData
Input followed a terminal padded quantum.
InvalidLineWrap
Wrapped body layout is malformed.
Implementations§
Source§impl InputError
impl InputError
Sourcepub const fn kind(self) -> InputErrorKind
pub const fn kind(self) -> InputErrorKind
Returns a redacted, stable error class.
Trait Implementations§
Source§impl Clone for InputError
impl Clone for InputError
Source§fn clone(&self) -> InputError
fn clone(&self) -> InputError
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 InputError
Source§impl Debug for InputError
impl Debug for InputError
Source§impl Display for InputError
impl Display for InputError
impl Eq for InputError
Source§impl Hash for InputError
impl Hash for InputError
Source§impl PartialEq for InputError
impl PartialEq for InputError
impl StructuralPartialEq for InputError
Auto Trait Implementations§
impl Freeze for InputError
impl RefUnwindSafe for InputError
impl Send for InputError
impl Sync for InputError
impl Unpin for InputError
impl UnsafeUnpin for InputError
impl UnwindSafe for InputError
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