| Crates.io | system_dns |
| lib.rs | system_dns |
| version | 1.0.0 |
| created_at | 2018-01-12 18:10:04.276554+00 |
| updated_at | 2018-01-12 18:10:46.000274+00 |
| description | Simple API to query the system dns |
| homepage | https://github.com/valarauca/system_dns |
| repository | https://github.com/valarauca/system_dns |
| max_upload_size | |
| id | 46554 |
| size | 695,487 |
For valid #[cfg(any(unix))] systems this provides a simple API to
make DNS requests against the system resolver. This includes your
hosts file, and any configuration that maybe done to your system.
#[dependencies]
system_dns = "1.0.0"
extern crate system_dns;
use system_dns::system_resolve_ipv4;
let results: Vec<IpAddr> = match system_resolve_ipv4("google.com") {
Ok(x) => x,
Err(e) => panic!("Failed to resolve `google.com`. Error {:?}", e)
};