Expand description
A generic URI/IRI handling library compliant with RFC 3986 and RFC 3987.
Examples: Parsing. Building. Reference resolution. Normalization. Percent-decoding. Percent-encoding.
§Terminology
A URI reference is either a URI or a relative reference. If it starts with a scheme
(like http, ftp, mailto, etc.) followed by a colon (:), it is a URI. For example,
http://example.com/ and mailto:user@example.com are URIs. Otherwise, it is
a relative reference. For example, //example.org/, /index.html, ../, foo,
?bar, and #baz are relative references.
An IRI (reference) is an internationalized version of URI (reference) which may contain non-ASCII characters.
§Guidance for crate users
Advice for designers of new URI schemes can be found in RFC 7595. Guidance on the specification of URI substructure in standards can be found in RFC 8820. The crate author recommends RFC 9413 for further reading as the long-term interoperability of URI schemes may be of concern.
§Crate features
-
std(default): Enablesstdsupport. Required forErrorimplementations andAuthority::socket_addrs. -
net: Enablesstd::netorcore::netsupport. Required for IP address fields inHost, forBuilder::hostto take an IP address as argument, and forAuthority::socket_addrs. Disablingstdwhile enablingnetrequires a minimum Rust version of 1.77. -
serde: Enablesserdesupport. Required forSerializeandDeserializeimplementations.