Labels are always stored as ASCII, unicode characters must be encoded with punycode
These must only be ASCII, with unicode encoded to PunyCode, or other such transformation.
This uses the bytes as raw ascii values, with nothing escaped on the wire.
Generally users should use from_str
or from_ascii
Translates this string into IDNA safe name, encoding to punycode as necessary.
Takes the ascii string and returns a new label.
This will return an Error if the label is not an ascii string
Converts this label to lowercase
Returns true if this label is the wildcard, '*', label
Returns the lenght in bytes of this label
Returns the raw bytes of the label, this is good for writing to the wire.
See Display
for presentation version (unescaped from punycode, etc)
Performs the equivelence operation disregarding case
compares with the other label, ignoring case
Performs the conversion to utf8 from IDNA as necessary, see fmt
for more details
Converts this label to safe ascii, escaping characters as necessary
If this is an IDNA, punycode, label, then the xn-- prefix will be maintained as ascii
Writes this label to safe ascii, escaping characters as necessary
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Feeds this value into the given [Hasher
]. Read more
Feeds a slice of this type into the given [Hasher
]. Read more
outputs characters in a safe string manner.
if the string is punycode, i.e. starts with xn--
, otherwise it translates to a safe ascii string
escaping characters as necessary.
Immutably borrows from an owned value. Read more
Converts the given value to a String
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)