| Crates.io | google-dns-rs |
| lib.rs | google-dns-rs |
| version | 0.3.0 |
| created_at | 2021-11-13 10:53:20.674113+00 |
| updated_at | 2021-11-13 16:10:10.448543+00 |
| description | google-dns-rs is a third party Google DNS client for rust |
| homepage | |
| repository | https://github.com/eduardostuart/google-dns-rs |
| max_upload_size | |
| id | 481346 |
| size | 11,621 |
Add the following line to your Cargo.toml file:
google-dns-rs = "0.3.0"
use google_dns_rs::api::{Dns, DoH, Result};
async fn github_dns_records() -> Result<Dns> {
DoH::new("github.com".to_string())
// .set_type(2) // NS record type
// .set_cd(true) // disable or enable DNSSEC check
// .set_ct("application/x-javascript".to_string()) // content type
// .set_do(true) // include DNSSEC recods
.resolve()
.await
}