[][src]Struct rust_icu_ucol::UCollator

pub struct UCollator { /* fields omitted */ }

Implementations

impl UCollator[src]

pub fn strcoll(&self, first: &UChar, second: &UChar) -> Ordering[src]

Compares strings first and second according to the collation rules in this collator.

Returns Ordering::Less if first compares as less than second, and for other return codes respectively.

Implements ucol_strcoll

pub fn strcoll_utf8(
    &self,
    first: impl AsRef<str>,
    second: impl AsRef<str>
) -> Result<Ordering, Error>
[src]

Compares strings first and second according to the collation rules in this collator.

Returns Ordering::Less if first compares as less than second, and for other return codes respectively.

In contrast to UCollator::strcoll, this function requires no string conversions to compare two rust strings.

Implements ucol_strcoll

Trait Implementations

impl Debug for UCollator[src]

impl Drop for UCollator[src]

fn drop(&mut self)[src]

Releases the resources taken up by a single collator.

Implements ucol_close

impl<'_> TryFrom<&'_ str> for UCollator[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(locale: &str) -> Result<UCollator, Self::Error>[src]

Makes a new collator from the supplied locale, e.g. en-US, or de@collation=phonebook.

Other examples:

  • el-u-kf-upper
  • el@colCaseFirst=upper

Implements ucol_open

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.