Cargo Features

[dependencies]
fqdn = { version = "0.4.4", default-features = false, features = ["strict-rfc", "domain-name-length-limited-to-255", "domain-label-length-limited-to-63", "domain-name-without-special-chars", "domain-name-should-have-trailing-dot", "domain-label-cannot-start-or-end-with-hyphen", "punycode", "serde"] }
default = domain-label…or-end-with-hyphen

By default, this crate allows also underscores ('_') in FQDN and has greater length limits than the RFC allows but domain labels can’t start or end with hyphens

strict-rfc = domain-label…or-end-with-hyphen, domain-label-length-limited-to-63, domain-name-length-limited-to-255, domain-name-should…trailing-dot, domain-name-without-special-chars

Activate all the features to conform to all RFC
RFC1035 accepts only digits, letters and '-' in FQDN, labels are 1 to 63 chars long,
max length of FQDN including null label is 255 chars (i.e. 253 visible chars)
RFC952: labels cannot start or end with hyphens
RFC1123: labels can start with numbers (so there is no limitation about digit positions)

domain-name-length-limited-to-255 strict-rfc?
domain-label-length-limited-to-63 strict-rfc?
domain-name-without-special-chars strict-rfc?
domain-name-should-have-trailing-dot strict-rfc?
domain-label-cannot-start-or-end-with-hyphen default strict-rfc?

Features from optional dependencies

punycode implicit feature

Enables punycode

Activate punycode conversion (RFC3492 Punycode).

serde implicit feature

Enables serde

Activate (de)serialization mechanism