base_scheduler/address_resolve_error_kind.rs
1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4/// Portable classification of resolver failures. Native error codes remain available separately and are not errno values.
5#[derive(Clone, Copy, Debug, Eq, PartialEq)]
6#[non_exhaustive]
7pub enum AddressResolveErrorKind {
8 /// A temporary failure for which a later retry may succeed, such as `EAI_AGAIN`. Converts to [`io::ErrorKind::WouldBlock`](std::io::ErrorKind::WouldBlock).
9 TemporaryFailure,
10 /// The name is unknown or has no addresses, such as `EAI_NONAME`. Converts to [`io::ErrorKind::NotFound`](std::io::ErrorKind::NotFound).
11 NameNotFound,
12 /// The service is not available for the requested socket type, such as `EAI_SERVICE`. Converts to [`io::ErrorKind::NotFound`](std::io::ErrorKind::NotFound).
13 ServiceUnavailable,
14 /// The hints are invalid or unsupported, such as `EAI_BADFLAGS`, `EAI_FAMILY`, or `EAI_SOCKTYPE`. Converts to [`io::ErrorKind::InvalidInput`](std::io::ErrorKind::InvalidInput).
15 InvalidHints,
16 /// A non-recoverable resolver failure, such as `EAI_FAIL`. Converts to [`io::ErrorKind::Other`](std::io::ErrorKind::Other).
17 PermanentFailure,
18 /// The resolver could not allocate memory. Converts to [`io::ErrorKind::OutOfMemory`](std::io::ErrorKind::OutOfMemory).
19 OutOfMemory,
20 /// An underlying system failure, described by [`AddressResolveError::system_error`](crate::AddressResolveError::system_error). Converts to that error's kind, or [`io::ErrorKind::Other`](std::io::ErrorKind::Other) when it is absent.
21 System,
22 /// A failure outside the other categories. Converts to [`io::ErrorKind::Other`](std::io::ErrorKind::Other).
23 Other,
24}