pub fn is_localhost_addr(addr: SocketAddr) -> boolExpand description
Validate that a socket address is localhost only.
Returns true only for 127.0.0.1 (IPv4) or ::1 (IPv6).
Returns false for 0.0.0.0, [::], or any non-loopback address.
pub fn is_localhost_addr(addr: SocketAddr) -> boolValidate that a socket address is localhost only.
Returns true only for 127.0.0.1 (IPv4) or ::1 (IPv6).
Returns false for 0.0.0.0, [::], or any non-loopback address.