pub struct AddressHints {
pub domain: Option<SocketDomain>,
pub socket_type: Option<SocketType>,
pub protocol: Option<SocketProtocol>,
pub passive: bool,
pub numeric_host: bool,
pub address_configured: bool,
}Expand description
Typed hints passed to the resolver. Defaults request either IP family, any socket type/protocol, and no flags.
Fields§
§domain: Option<SocketDomain>Restrict results to one IP family; None accepts either.
socket_type: Option<SocketType>Restrict results to one socket type; None accepts any.
protocol: Option<SocketProtocol>Restrict results to one protocol; None accepts any.
passive: boolWith no hostname, request wildcard addresses suitable for binding; otherwise this flag has no effect. Without this flag, an absent hostname selects loopback addresses.
numeric_host: boolRequire a numeric hostname, preventing hostname lookup. Literal syntax, including IPv6 scope identifiers, follows the backend.
address_configured: boolAsk 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.
Trait Implementations§
Source§impl Clone for AddressHints
impl Clone for AddressHints
impl Copy for AddressHints
Source§impl Debug for AddressHints
impl Debug for AddressHints
Source§impl Default for AddressHints
impl Default for AddressHints
impl Eq for AddressHints
Source§impl PartialEq for AddressHints
impl PartialEq for AddressHints
impl StructuralPartialEq for AddressHints
Auto Trait Implementations§
impl Freeze for AddressHints
impl RefUnwindSafe for AddressHints
impl Send for AddressHints
impl Sync for AddressHints
impl Unpin for AddressHints
impl UnsafeUnpin for AddressHints
impl UnwindSafe for AddressHints
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