Enum vodozemac::Base64DecodeError
source · pub enum Base64DecodeError {
InvalidByte(usize, u8),
InvalidLength(usize),
InvalidLastSymbol(usize, u8),
InvalidPadding,
}
Expand description
Errors that can occur while decoding.
Variants§
InvalidByte(usize, u8)
An invalid byte was found in the input. The offset and offending byte are provided.
Padding characters (=
) interspersed in the encoded form are invalid, as they may only
be present as the last 0-2 bytes of input.
This error may also indicate that extraneous trailing input bytes are present, causing otherwise valid padding to no longer be the last bytes of input.
InvalidLength(usize)
The length of the input, as measured in valid base64 symbols, is invalid. There must be 2-4 symbols in the last input quad.
InvalidLastSymbol(usize, u8)
The last non-padding input symbol’s encoded 6 bits have nonzero bits that will be discarded. This is indicative of corrupted or truncated Base64. Unlike DecodeError::InvalidByte, which reports symbols that aren’t in the alphabet, this error is for symbols that are in the alphabet but represent nonsensical encodings.
InvalidPadding
The nature of the padding was not as configured: absent or incorrect when it must be canonical, or present when it must be absent, etc.
Trait Implementations§
source§impl Clone for DecodeError
impl Clone for DecodeError
source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DecodeError
impl Debug for DecodeError
source§impl Display for DecodeError
impl Display for DecodeError
source§impl Error for DecodeError
impl Error for DecodeError
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
source§impl From<DecodeError> for DecodeError
impl From<DecodeError> for DecodeError
source§fn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
source§impl From<DecodeError> for KeyError
impl From<DecodeError> for KeyError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
source§impl From<DecodeError> for LibolmPickleError
impl From<DecodeError> for LibolmPickleError
source§fn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
source§impl From<DecodeError> for MessageDecodeError
impl From<DecodeError> for MessageDecodeError
source§fn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
source§impl From<DecodeError> for MessageDecodeError
impl From<DecodeError> for MessageDecodeError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
source§impl From<DecodeError> for PickleError
impl From<DecodeError> for PickleError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
source§impl From<DecodeError> for SignatureError
impl From<DecodeError> for SignatureError
source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)