Enum vodozemac::Base64DecodeError
source · [−]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.
InvalidLength
The length of the input is invalid.
A typical cause of this is stray trailing whitespace or other separator bytes.
In the case where excess trailing bytes have produced an invalid length and the last byte
is also an invalid base64 symbol (as would be the case for whitespace, etc), InvalidByte
will be emitted instead of InvalidLength
to make the issue easier to debug.
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 InvalidByte, which reports symbols that aren’t in the alphabet, this error is for symbols that are in the alphabet but represent nonsensical encodings.
Trait Implementations
sourceimpl Clone for DecodeError
impl Clone for DecodeError
sourcefn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DecodeError
impl Debug for DecodeError
sourceimpl Display for DecodeError
impl Display for DecodeError
sourceimpl Error for DecodeError
impl Error for DecodeError
sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting
sourceimpl From<DecodeError> for SignatureError
impl From<DecodeError> for SignatureError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeError> for KeyError
impl From<DecodeError> for KeyError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeError> for SessionKeyDecodeError
impl From<DecodeError> for SessionKeyDecodeError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeError> for PickleError
impl From<DecodeError> for PickleError
sourcefn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeError> for LibolmPickleError
impl From<DecodeError> for LibolmPickleError
sourcefn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
Converts to this type from the input type.
sourceimpl From<DecodeError> for DecodeError
impl From<DecodeError> for DecodeError
sourcefn from(source: Base64DecodeError) -> Self
fn from(source: Base64DecodeError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<DecodeError> for DecodeError
impl PartialEq<DecodeError> for DecodeError
sourcefn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DecodeError) -> bool
fn ne(&self, other: &DecodeError) -> bool
This method tests for !=
.
impl Eq for DecodeError
impl StructuralEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnwindSafe for DecodeError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more