Struct Collator

#[repr(transparent)]
pub struct Collator { /* private fields */ }

The Intl.Collator object is a constructor for collators, objects that enable language sensitive string comparison.

MDN documentation

Implementations

impl Collator

fn new(locales: &Array, options: &Object) -> Collator

The Intl.Collator object is a constructor for collators, objects that enable language sensitive string comparison.

MDN documentation

impl Collator

fn supported_locales_of(locales: &Array, options: &Object) -> Array

The Intl.Collator.supportedLocalesOf() method returns an array containing those of the provided locales that are supported in collation without having to fall back to the runtime's default locale.

MDN documentation

impl Collator

fn compare(&self) -> Function

The Intl.Collator.prototype.compare property returns a function that compares two strings according to the sort order of this Collator object.

MDN documentation

impl Collator

fn resolved_options(&self) -> Object

The Intl.Collator.prototype.resolvedOptions() method returns a new object with properties reflecting the locale and collation options computed during initialization of this Collator object.

MDN documentation

Trait Implementations

impl AsRef<Collator> for Collator

fn as_ref(&self) -> &Collator

impl AsRef<JsValue> for Collator

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for Collator

fn as_ref(&self) -> &Object

impl Clone for Collator

fn clone(&self) -> Self

impl Debug for Collator

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for Collator

fn default() -> Self

impl Deref for Collator

type Target = Object;
fn deref(&self) -> &Object

impl ErasableGeneric for Collator

type Repr = JsValue;

impl From<JsValue> for Collator

fn from(obj: JsValue) -> Self

impl FromWasmAbi for Collator

type Abi = <JsValue as FromWasmAbi>::Abi;
unsafe fn from_abi(js: Self::Abi) -> Self

impl IntoJsGeneric for Collator where Collator: JsGeneric,

type JsCanon = Collator;
fn to_js(self) -> Collator

impl IntoWasmAbi for Collator

type Abi = <JsValue as IntoWasmAbi>::Abi;
fn into_abi(self) -> Self::Abi

impl JsCast for Collator

fn instanceof(val: &JsValue) -> bool
fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self

impl LongRefFromWasmAbi for Collator

type Abi = <JsValue as LongRefFromWasmAbi>::Abi;
type Anchor = Collator;
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

impl OptionFromWasmAbi for Collator

fn is_none(abi: &Self::Abi) -> bool

impl OptionIntoWasmAbi for Collator

fn none() -> Self::Abi

impl Promising for Collator

type Resolution = Collator;

impl RefFromWasmAbi for Collator

type Abi = <JsValue as RefFromWasmAbi>::Abi;
type Anchor = ManuallyDrop<Collator>;
unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

impl UpcastFrom<Collator> for Collator

impl WasmDescribe for Collator

fn describe()

Auto Trait Implementations

impl Freeze for Collator

impl RefUnwindSafe for Collator

impl Send for Collator

impl Sync for Collator

impl Unpin for Collator

impl UnsafeUnpin for Collator

impl UnwindSafe for Collator

Blanket Implementations

impl<P, T> Receiver for Collator where P: Deref<Target = T> + ?Sized, T: ?Sized,

impl<S, T> Upcast<T> for Collator where T: UpcastFrom<S> + ?Sized, S: ?Sized,

impl<T> Any for Collator where T: 'static + ?Sized,

impl<T> Borrow<T> for Collator where T: ?Sized,

impl<T> BorrowMut<T> for Collator where T: ?Sized,

impl<T> CloneToUninit for Collator where T: Clone,

impl<T> From<T> for Collator

impl<T> JsGeneric for Collator where T: ErasableGeneric<Repr = JsValue> + UpcastFrom<T> + Upcast<JsValue> + JsCast + 'static,

impl<T> ReturnWasmAbi for Collator where T: IntoWasmAbi,

impl<T> ToOwned for Collator where T: Clone,

impl<T> TryFromJsValue for Collator where T: JsCast,

impl<T> VectorFromWasmAbi for Collator where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorIntoWasmAbi for Collator where T: ErasableGeneric<Repr = JsValue> + WasmDescribe,

impl<T> VectorRefIntoWasmAbi for Collator where &'a T: for<'a> Into<JsValue>,

impl<T, U> Into<U> for Collator where U: From<T>,

impl<T, U> TryFrom<U> for Collator where U: Into<T>,

impl<T, U> TryInto<U> for Collator where U: TryFrom<T>,