Struct rust_icu_uloc::ULoc[][src]

pub struct ULoc { /* fields omitted */ }
Expand description

A representation of a Unicode locale.

For the time being, only basic conversion and methods are in fact implemented.

To get basic validation when creating a locale, use for_language_tag with a Unicode BCP-47 locale ID.

Implementations

Implements uloc_getLanguage.

Implements uloc_getScript.

Implements uloc_getCountry.

Implements uloc_getVariant.

Implements uloc_canonicalize from ICU4C.

Implements uloc_addLikelySubtags from ICU4C.

Implements uloc_minimizeSubtags from ICU4C.

Implements uloc_toLanguageTag from ICU4C.

Implements uloc_openKeywords() from ICU4C.

Implements icu::Locale::getUnicodeKeywords() from the C++ API.

Implements uloc_getKeywordValue() from ICU4C.

Implements icu::Locale::getUnicodeKeywordValue() from ICU4C.

Returns the current label of this locale.

Returns the current locale name as a C string.

Implements uloc_forLanguageTag from ICU4C.

Note that an invalid tag will cause that tag and all others to be ignored. For example en-us will work but en_US will not.

Implements uloc_getBaseName from ICU4C.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Implement the Display trait to convert the ULoc into string for display.

The string for display and string serialization happen to be the same for ULoc.

Formats the value using the given formatter. Read more

Turns ULoc into ULocMut, which can be mutated.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Creates a new ULoc from a borrowed C string.

The type returned in the event of a conversion error.

Creates a new ULoc from a string slice.

The creation wil fail if the locale is nonexistent.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.