Struct urn::Urn [−][src]
pub struct Urn { /* fields omitted */ }Expand description
An RFC2141/8141 URN (Uniform Resource Name).
Note: the equivalence checks are done
according to the specification,
only taking the NID and NSS into account! If you need exact equivalence checks, consider
comparing using Urn::as_str() as the key. Some namespaces may define additional lexical
equivalence checks, these aren’t accounted for in this implementation.
Implementations
NID (Namespace identifier), the first part of the URN.
For example, in urn:ietf:rfc:2648, ietf is the namespace.
NSS (Namespace-specific string) identifying the resource.
For example, in urn:ietf:rfc:2648, rfs:2648 is the NSS.
Set the namespace-specific string (must be a valid NSS and use percent-encoding).
r-component, following the ?+ character sequence, to be used for passing parameters
to URN resolution services.
In urn:example:foo-bar-baz-qux?+CCResolve:cc=uk, CCResolve:cc=uk is the r-component.
Should not be used for equivalence checks. As of 2021, exact semantics are undefined.
Set the r-component (must be a valid r-component and use percent-encoding).
q-component, following the ?= character sequence. Has a similar function to the URL query
string.
Should not be used for equivalence checks.
Set the q-component (must be a valid q-component and use percent-encoding).
f-component (fragment) following the # character at the end of the URN.
Should not be used for equivalence checks.
Set the f-component (must be a valid f-component and use percent-encoding).