Crate fqdn[−][src]
Expand description
A fully qualified domain name representation
Notice that a fully qualified domain name (or FQDN) is case-insensitive.
So the implementation of traits like Hash or PartialEq do the same.
Crate features
Some limitations are enforced by the Internet RFC but some of them are defaultly relaxed to fit with more applicative contexts. Features are available in order to activate or not these limitations, depending on applicative purposes.
These features control how the parsing of a String should be done.
Violation of one of these activated limitations raises an error (see Error).
domain-label-length-limited-to-63
The internet standards specifies that each label of a FQDN is limited to 63 characters. By default, this crate allows up to 256 characters but the 63 limitation could be set through the activation of this feature.
domain-name-length-limited-to-255
The internet standards specifies that the total length of a FQDN is limited to 255 characters. By default, the only limit is the available memory but the 255 limitation could be set through the activation of this feature.
domain-name-without-special-chars
The internet standards specifies that a FQDN should only contains digits, letters and hyphen (-).
But, many network equipment accepts also _ (underscore) without problems. If this crate is used to design
something like a firewall, it could be necessary to deal with this, so do this crate.
At the contrary, the activation of this feature refuses such special characters.
domain-label-should-start-with-letter
The internet standards specifies that FQDN should always start with a letter (nor a digit, nor a hyphen). By default, this crate accept any of theses characters event at the first position. The activation of this feature enforces the use of a letter at the beginning of FQDN.
domain-label-should-have-trailing-dot
The internet standards specifies that the human readable representation of FQDN should always end with a dot. If this feature is activated, then parsing or printing a FQDN strictly apply this rule. By default, these behaviors are more laxist.
RFC 1035
The RFC 1035 has some restrictions that are not activated by default.
The feature strict-rfc-1035 activates all of them:
domain-label-length-limited-to-63domain-name-length-limited-to-255domain-name-without-special-charsdomain-label-should-start-with-letterdomain-label-should-have-trailing-dot
See above for more details.
Macros
Parses a list of strings and creates an new FQDN by concatenating them.
Structs
Enums
Error when FQDN parsing goes wrong