Enum base64::DecodeError
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
use the Display impl or to_string()
replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more