pub enum DecodeError {
Base64Error(DecodeError),
NotEnoughBytes,
TooManyBytes,
Utf8Error(Utf8Error),
AddrParseError(AddrParseError),
AddrParseIpv6ClosingBracket,
MissingAddr,
Len,
ParseIntError(ParseIntError),
InvalidInput {
cause: String,
},
UnknownType(u8),
}Expand description
This enum represent all decode errors.
Variants§
Base64Error(DecodeError)
This error occurs if the base64 string could not be decoded.
NotEnoughBytes
This error occurs if there is not enough bytes.
TooManyBytes
This error occurs if there is too many bytes.
Utf8Error(Utf8Error)
This error occurs if a string could not be decoded.
AddrParseError(AddrParseError)
This error occurs if the address could not be decoded.
AddrParseIpv6ClosingBracket
This error occurs if the IPv6 address does not have the closing bracket ‘]’.
MissingAddr
This error occurs if an address is missing.
Len
This error occurs if the length of an array has not the expected value.
ParseIntError(ParseIntError)
This error occurs if the a integer could not be parsed. For example when a port decoded.
InvalidInput
This error occurs if the regex DNS_STAMP_REGEX is not matched.
UnknownType(u8)
This error occurs if the type is unknown.
Trait Implementations§
Source§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
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<AddrParseError> for DecodeError
impl From<AddrParseError> for DecodeError
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for DecodeError
impl From<DecodeError> for DecodeError
Source§fn from(source: Base64Error) -> Self
fn from(source: Base64Error) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for DecodeError
impl From<ParseIntError> for DecodeError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for DecodeError
impl From<Utf8Error> for DecodeError
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
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
Mutably borrows from an owned value. Read more