pub enum CodecError {
MissingPrefix {
prefix: String,
},
OddHexLength {
digits: usize,
},
InvalidHexDigit {
index: usize,
character: char,
},
InvalidBase64 {
source: DecodeError,
},
InvalidPercentEscape {
index: usize,
},
InvalidUtf8 {
source: FromUtf8Error,
},
}Expand description
Error returned by codec operations.
Variants§
MissingPrefix
A configured prefix was required but missing.
OddHexLength
Hex input contained an odd number of digits.
InvalidHexDigit
Hex input contained a non-hexadecimal digit.
InvalidBase64
Base64 input was malformed.
Fields
§
source: DecodeErrorUnderlying Base64 decoder error.
InvalidPercentEscape
Percent input contained a malformed %XX escape.
InvalidUtf8
Decoded bytes were not valid UTF-8.
Fields
§
source: FromUtf8ErrorUnderlying UTF-8 conversion error.
Trait Implementations§
Source§impl Debug for CodecError
impl Debug for CodecError
Source§impl Display for CodecError
impl Display for CodecError
Source§impl Error for CodecError
impl Error for CodecError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DecodeError> for CodecError
impl From<DecodeError> for CodecError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for CodecError
impl From<FromUtf8Error> for CodecError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CodecError
impl RefUnwindSafe for CodecError
impl Send for CodecError
impl Sync for CodecError
impl Unpin for CodecError
impl UnsafeUnpin for CodecError
impl UnwindSafe for CodecError
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