Enum const_base::errors::DecodeError [−][src]
pub enum DecodeError { InvalidByte(InvalidByte), MismatchedOutputLength(MismatchedOutputLength), InvalidInputLength(InvalidInputLength), }
Expand description
Error returned by decode
Variants
When one of the bytes isn’t in the char set for that encoding.
Eg: a !
in an otherwise base 64 encoded string.
Tuple Fields of InvalidByte
0: InvalidByte
When the array returned by decode
isn’t the same length as what the arguments
passed to decode
would produce.
Tuple Fields of MismatchedOutputLength
When the slice passed to decode
is not a valid length for that encoding.
For base 64 that is when input.len() % 4
equals 1
.
Tuple Fields of InvalidInputLength
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.