Crate ascii_domain
source ·Expand description
§ascii_domain
ascii_domain
is a library for efficiently parsing domains based on a supplied ASCII character set one
wants to enforce each dom::Label
to conform to. The primary type in the library is dom::Domain
which can be thought of as domains in representation format. Technically since any ASCII u8
except
b'.'
is allowed in a Label
, it is more general than an actual representation format that doesn’t
include some form of escape characters. For a full-fledged DNS library look elsewhere (e.g.,
domain
).
The purpose of this library is to allow efficient customization of domain name parsing while still retaining the hierarchical structure of a domain. Depending on one’s use case, allowed formats and characters can differ. If one wants to conform to the Domain Name System (DNS), all octets are allowed; but conforming to RFC 1123 or RFC 5891 requires stricter formats and a reduced character set.
Modules§
- Contains
char_set::AllowedAscii
which is how one dictates the character setdom::Domain::try_from_bytes
uses. - Contains
dom::Domain
which is a domain whosedom::Label
s consist of a subset of the suppliedchar_set::AllowedAscii
. Also containsdom::Rfc1123Domain
which is aDomain
that conforms to RFC 1123. - serde
serde
Contains a SerdeVisitor
that can be used to help deserializedom::Domain
wrappers.