Function get_ip_addrs

Source
pub async fn get_ip_addrs(s: &str) -> Result<Vec<IpAddr>, Error>
Expand description

Resolving domain to get IpAddr Note: must run as async runtime,such as tokio::task::spawn_blocking

Examples found in repository?
examples/dns.rs (line 22)
21async fn custom_dns_resolver(host: &str) {
22    println!("{host}:{:?}", get_ip_addrs(host).await.unwrap());
23}