fqdn

Crates.iofqdn
lib.rsfqdn
version0.5.2
created_at2021-09-22 09:12:11.873852+00
updated_at2026-01-12 14:49:10.640864+00
descriptionFQDN (Fully Qualified Domain Name)
homepage
repositoryhttps://github.com/Orange-OpenSource/fqdn
max_upload_size
id454785
size58,347
Christophe Dousson (XopheD)

documentation

https://docs.rs/fqdn

README

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.
  • label could not start or end by hyphen (domain-label-cannot-start-or-end-with-hyphen)

IMPORTANT: Since 0.5, the feature domain-label-cannot-start-or-end-with-hyphen is no longer activated by default.

Commit count: 51

cargo fmt