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_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.
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.
Trait Implementations
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.
This implementation is based on ULocale.compareTo from ICU4J. See https://github.com/unicode-org/icu/blob/%6d%61%73%74%65%72/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java
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
Auto Trait Implementations
impl RefUnwindSafe for ULoc
impl UnwindSafe for ULoc
Blanket Implementations
Mutably borrows from an owned value. Read more