base_scheduler/address_hints.rs
1// Released under the MIT License.
2// Copyright, 2026, by Samuel Williams.
3
4use crate::{SocketDomain, SocketProtocol, SocketType};
5
6/// Typed hints passed to the resolver. Defaults request either IP family, any socket type/protocol, and no flags.
7#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
8pub struct AddressHints {
9 pub domain: Option<SocketDomain>,
10 pub socket_type: Option<SocketType>,
11 pub protocol: Option<SocketProtocol>,
12 /// With no hostname, request wildcard addresses suitable for binding; otherwise this flag has no effect. Without this flag, an absent hostname selects loopback addresses.
13 pub passive: bool,
14 /// Require a numeric hostname, preventing hostname lookup. Literal syntax, including IPv6 scope identifiers, follows the backend.
15 pub numeric_host: bool,
16 /// Ask the resolver to return families configured on the local system (`AI_ADDRCONFIG`). This is opt-in; loopback addresses do not establish a configured family on native backends.
17 pub address_configured: bool,
18}