3 unstable releases

0.3.11 Jun 7, 2024
0.3.9 May 24, 2024
0.3.4 Mar 1, 2024
0.3.2 Sep 18, 2023
0.1.8 Oct 26, 2021

#179 in Data structures

Download history 2009/week @ 2024-03-29 1541/week @ 2024-04-05 1365/week @ 2024-04-12 1098/week @ 2024-04-19 1027/week @ 2024-04-26 2173/week @ 2024-05-03 1489/week @ 2024-05-10 2350/week @ 2024-05-17 1794/week @ 2024-05-24 1583/week @ 2024-05-31 2019/week @ 2024-06-07 2884/week @ 2024-06-14 2470/week @ 2024-06-21 2103/week @ 2024-06-28 2543/week @ 2024-07-05 1990/week @ 2024-07-12

9,717 downloads per month
Used in 25 crates (4 directly)

MIT license

39KB
556 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.

Notice that this RFC introduces some size limits which are not defaulty set by 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 start with a letter (domain-label-should-start-with-letter)
  • 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.

No runtime deps

Features