pub struct Collator(pub Collator);
Tuple Fields§
§0: Collator
Implementations§
source§impl Collator
impl Collator
sourcepub fn create_v1(
provider: &DataProvider,
locale: &Locale,
options: CollatorOptionsV1,
) -> Result<Box<Collator>, DataError>
pub fn create_v1( provider: &DataProvider, locale: &Locale, options: CollatorOptionsV1, ) -> Result<Box<Collator>, DataError>
Construct a new Collator instance.
sourcepub fn compare_utf8(&self, left: &DiplomatStr, right: &DiplomatStr) -> Ordering
pub fn compare_utf8(&self, left: &DiplomatStr, right: &DiplomatStr) -> Ordering
Compare two strings.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn compare_utf16(
&self,
left: &DiplomatStr16,
right: &DiplomatStr16,
) -> Ordering
pub fn compare_utf16( &self, left: &DiplomatStr16, right: &DiplomatStr16, ) -> Ordering
Compare two strings.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
sourcepub fn resolved_options_v1(&self) -> CollatorResolvedOptionsV1
pub fn resolved_options_v1(&self) -> CollatorResolvedOptionsV1
The resolved options showing how the default options, the requested options,
and the options from locale data were combined. None of the struct fields
will have Auto
as the value.
Auto Trait Implementations§
impl Freeze for Collator
impl RefUnwindSafe for Collator
impl Send for Collator
impl Sync for Collator
impl Unpin for Collator
impl UnwindSafe for Collator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more