use-dns 0.1.0

DNS record-type and DNS name helpers for RustUse.
Documentation
  • Coverage
  • 100%
    26 out of 26 items documented1 out of 11 items with examples
  • Size
  • Source code size: 7.67 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 410.32 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-net
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-dns

use-dns provides lightweight helpers for DNS record types and DNS-style names.

Experimental: this crate is below 0.3.0 and the API may change.

Example Usage

use use_dns::{format_record_type, normalize_dns_name, parse_record_type, DnsRecordType};

assert_eq!(parse_record_type("aaaa"), DnsRecordType::AAAA);
assert_eq!(format_record_type(DnsRecordType::MX), "MX");
assert_eq!(normalize_dns_name("_sip._tcp.EXAMPLE.com."), Some("_sip._tcp.example.com".to_string()));

Scope

  • DNS record type parsing and formatting.
  • Small DNS record classification helpers.
  • DNS-style name normalization.

Non-goals

  • DNS resolution.
  • Zone file parsing.
  • Resolver implementation.
  • DNSSEC validation.

License

Licensed under MIT OR Apache-2.0.