6 releases

new 0.4.3 Dec 8, 2024
0.4.2 Nov 18, 2024
0.4.1 Sep 27, 2024
0.3.11 Jun 7, 2024
0.1.8 Oct 26, 2021

#129 in Data structures

Download history 6471/week @ 2024-08-20 5713/week @ 2024-08-27 5834/week @ 2024-09-03 5893/week @ 2024-09-10 4873/week @ 2024-09-17 6487/week @ 2024-09-24 6904/week @ 2024-10-01 7432/week @ 2024-10-08 6937/week @ 2024-10-15 7031/week @ 2024-10-22 7710/week @ 2024-10-29 7966/week @ 2024-11-05 10368/week @ 2024-11-12 10801/week @ 2024-11-19 10076/week @ 2024-11-26 8871/week @ 2024-12-03

41,772 downloads per month
Used in 40 crates (6 directly)

MIT license

46KB
715 lines

fqdn

Crates.io Crates.io License Docs

Fully Qualified Domain Name

This crate allows basic manipulation of FQDN with an inner representation compatible with the RFC 1035.

So, all comparisons between character strings (e.g., labels, domain names, etc.) are done in a case-insensitive manner. Of course, FQDN hashing follows this behaviour. Note that FQDN are internally converted to lowercase.

Notice that this RFC introduces some size limits which are not set by default in this crate. The feature strict-rfc activates all of them but each of them could be activated independently of the others:

  • labels are limited to 63 chars (domain-label-length-limited-to-63)
  • names are limited to 255 chars (domain-name-length-limited-to-255)
  • labels should only contain letters, digits and hyphens (domain-name-without-special-chars)
  • FQDN should end with a period (domain-name-should-have-trailing-dot): notice that activating this feature modifies the behaviour of Display which adds a period at the end of the FQDN.

The only feature activated by default is the following:

  • label could not start or end by hyphen (domain-label-cannot-start-or-end-with-hyphen)

Dependencies

~165KB