Skip to main content

is_loopback

Function is_loopback 

Source
pub fn is_loopback(value: &str) -> bool
Expand description

Whether value names a network location on this machine.

Accepts a URL (http://localhost:8000/path) or a bare authority (127.0.0.1:5432). Recognized: localhost and any *.localhost subdomain (RFC 6761 §6.3 reserves the TLD to loopback), 127.0.0.0/8 in dotted-quad form (RFC 1122 §3.2.1.3), and the IPv6 loopback ::1.