Skip to main content

parse_host_literal

Function parse_host_literal 

Source
fn parse_host_literal(host: &str) -> Option<IpAddr>
Expand description

Parses host as a literal IP address, stripping the URL-level brackets that wrap an IPv6 literal (e.g. [::1] → ::1). Returns None when host is a hostname rather than a literal.