Enum fqdn::Error [−][src]
pub enum Error {
TrailingDotMissing,
TrailingNulCharMissing,
InvalidLabelChar,
InvalidStructure,
TooLongDomainName,
TooLongLabel,
LabelDoesNotStartWithLetter,
EmptyLabel,
}Expand description
Error when FQDN parsing goes wrong
Variants
The trailing dot of the FQDN string is missing.
A valid FQDN string should be ended by a dot (e.g. github.com.).
The trailing nul byte of the FQDN bytes is missing.
A valid FQDN array of bytes should be ended by the nul byte (e.g. b"\x06github\x03com\x00")
An invalid character is found in a label of the FQDN.
The allowed characters in a FQDN label are letters, digits and '-'.
By default, this crate also accepts '_' in FQDN but this behavior could be deactivated with
the strict-rfc-1035 feature.
The analysed bytes are not consistent with a FQDN sequence of bytes.
Typically, the length bytes of labels are not consistent.
The name of the domain is too long
By default, there is no limit except if the strict-rfc-1035 feature is selected and
then, the domain name should be less than 255 characters (including the trailing dot).
One label of the FQDN is too long
The returned error contains the excessive length.
By default, the limit is set to 255 characters but if the strict-rfc-1035 feature is selected,
then this limit is set to 63 (as said in the RFC).
One label does not start with a letter
The returned error contains the start position of the involved label
One label is empty (e.g. starting dot as .github.com. or two following dots as github..com.)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more