pub enum DomainScope {
Global,
Local,
Literal(LiteralScope),
}Expand description
How far a domain reaches.
Obtained from EmailAddress::domain_scope.
Variants§
Global
A name the global DNS can resolve.
With the psl feature this is the stronger reading, a name under a
published public suffix; without it, the weaker one, a final label that
is TLD-like. Either way, a name reserved by the documents listed on
Local is not one of these.
Local
A name reserved for use inside a network, or a single label, which has no meaning outside the resolver that is asked.
The reserved names, each with the document reserving it:
| Name | Reserved by |
|---|---|
.localhost | RFC 6761 §6.3 |
.test | RFC 6761 §6.2 |
.invalid | RFC 6761 §6.4 |
.example | RFC 6761 §6.5 |
.local | RFC 6762 §3 |
home.arpa | RFC 8375 §2 |
.internal | ICANN Board resolution 2024.07.29.05 |
.onion | RFC 7686 §1 |
.alt | RFC 9476 §2 |
The last two are resolved by something other than the DNS rather than reserved for a network, so the global DNS cannot resolve them however far the name travels.
A name whose final label is not TLD-like, or which is under no published public suffix, lands here too: it is a name only the resolver being asked can answer for.
Literal(LiteralScope)
An address literal, which names a host directly rather than through the DNS.