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
impl ULoc
[src]
impl ULoc
[src]pub fn canonicalize(&self) -> Result<ULoc, Error>
[src]
pub fn canonicalize(&self) -> Result<ULoc, Error>
[src]Implements uloc_canonicalize
from ICU4C.
pub fn add_likely_subtags(&self) -> Result<ULoc, Error>
[src]
pub fn add_likely_subtags(&self) -> Result<ULoc, Error>
[src]Implements uloc_addLikelySubtags
from ICU4C.
pub fn minimize_subtags(&self) -> Result<ULoc, Error>
[src]
pub fn minimize_subtags(&self) -> Result<ULoc, Error>
[src]Implements uloc_minimizeSubtags
from ICU4C.
pub fn to_language_tag(&self, strict: bool) -> Result<String, Error>
[src]
pub fn to_language_tag(&self, strict: bool) -> Result<String, Error>
[src]Implements uloc_toLanguageTag
from ICU4C.
pub fn keywords(&self) -> impl Iterator<Item = String>
[src]
pub fn keywords(&self) -> impl Iterator<Item = String>
[src]Implements uloc_openKeywords()
from ICU4C.
pub fn unicode_keywords(&self) -> impl Iterator<Item = String>
[src]
pub fn unicode_keywords(&self) -> impl Iterator<Item = String>
[src]Implements icu::Locale::getUnicodeKeywords()
from the C++ API.
pub fn keyword_value(&self, keyword: &str) -> Result<Option<String>, Error>
[src]
pub fn keyword_value(&self, keyword: &str) -> Result<Option<String>, Error>
[src]Implements uloc_getKeywordValue()
from ICU4C.
pub fn unicode_keyword_value(
&self,
unicode_keyword: &str
) -> Result<Option<String>, Error>
[src]
pub fn unicode_keyword_value(
&self,
unicode_keyword: &str
) -> Result<Option<String>, Error>
[src]Implements icu::Locale::getUnicodeKeywordValue()
from ICU4C.
Trait Implementations
impl Display for ULoc
[src]
impl Display for ULoc
[src]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.
impl Ord for ULoc
[src]
impl Ord for ULoc
[src]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
impl PartialOrd<ULoc> for ULoc
[src]
impl PartialOrd<ULoc> for ULoc
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for ULoc
[src]
impl StructuralEq for ULoc
[src]
impl StructuralPartialEq for ULoc
[src]
Auto Trait Implementations
impl RefUnwindSafe for ULoc
impl Send for ULoc
impl Sync for ULoc
impl Unpin for ULoc
impl UnwindSafe for ULoc
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more