system_dns

Crates.iosystem_dns
lib.rssystem_dns
version1.0.0
sourcesrc
created_at2018-01-12 18:10:04.276554
updated_at2018-01-12 18:10:46.000274
descriptionSimple API to query the system dns
homepagehttps://github.com/valarauca/system_dns
repositoryhttps://github.com/valarauca/system_dns
max_upload_size
id46554
size695,487
Cody Laeder (valarauca)

documentation

https://valarauca.github.io/system_dns/system_dns/index.html

README

System DNS

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.

To use this crate

#[dependencies]
system_dns = "1.0.0"

Example

   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)
   };
Commit count: 3

cargo fmt