6 releases

0.3.4 Mar 1, 2024
0.3.2 Sep 18, 2023
0.3.0 Jul 5, 2023
0.2.3 Sep 2, 2022
0.1.8 Oct 26, 2021

#257 in Data structures

Download history 491/week @ 2023-12-04 296/week @ 2023-12-11 395/week @ 2023-12-18 34/week @ 2023-12-25 61/week @ 2024-01-01 495/week @ 2024-01-08 420/week @ 2024-01-15 357/week @ 2024-01-22 373/week @ 2024-01-29 923/week @ 2024-02-05 1129/week @ 2024-02-12 905/week @ 2024-02-19 1264/week @ 2024-02-26 583/week @ 2024-03-04 658/week @ 2024-03-11 399/week @ 2024-03-18

2,942 downloads per month
Used in 3 crates

MIT license

33KB
450 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-1035 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 by 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