#[non_exhaustive]pub enum AddrError {
UnsupportedAddressType,
DomainNameTooLong,
InvalidDomainNameEncoding,
InvalidIPv6MissingClosingBracket,
InvalidIPv6MissingPortSeparator,
InvalidTargetAddressMissingPortSeparator,
InvalidPortNumber,
InvalidIPv6Address,
}Expand description
Errors that can occur address decoding operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsupportedAddressType
The address type byte is not a supported address type.
DomainNameTooLong
The domain name exceeds maximum allowed length (255 bytes).
InvalidDomainNameEncoding
The domain name contains invalid UTF-8 encoding.
InvalidIPv6MissingClosingBracket
IPv6 address format is missing the closing bracket.
InvalidIPv6MissingPortSeparator
IPv6 address format is missing the port separator after the closing bracket.
InvalidTargetAddressMissingPortSeparator
Target address is missing the port separator.
InvalidPortNumber
Port number is not a valid integer between 0-65535.
InvalidIPv6Address
IPv6 address contains invalid format or characters.
Trait Implementations§
Source§impl Error for AddrError
impl Error for AddrError
1.30.0 · 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()
impl Eq for AddrError
impl StructuralPartialEq for AddrError
Auto Trait Implementations§
impl Freeze for AddrError
impl RefUnwindSafe for AddrError
impl Send for AddrError
impl Sync for AddrError
impl Unpin for AddrError
impl UnwindSafe for AddrError
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