Function public_ip::addr[][src]

pub async fn addr() -> Option<IpAddr>
This is supported on crate features dns-resolver or http-resolver only.
Expand description

Attempts to produce an IP address with all builtin resolvers (best effort).

This function will attempt to resolve until the stream is empty and will drop/ignore any resolver errors.