pub async fn get_ip_addrs(s: &str) -> Result<Vec<IpAddr>, Error>
Resolving domain to get IpAddr Note: must run as async runtime,such as tokio::task::spawn_blocking
IpAddr
tokio::task::spawn_blocking
21async fn custom_dns_resolver(host: &str) { 22 println!("{host}:{:?}", get_ip_addrs(host).await.unwrap()); 23}