Struct PluralRules

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

The Intl.PluralRules object is a constructor for objects that enable plural sensitive formatting and plural language rules.

MDN documentation

Implementations

impl PluralRules

fn resolved_options(&self) -> Object

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

MDN documentation

impl PluralRules

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

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

MDN documentation

impl PluralRules

fn select(&self, number: f64) -> JsString

The Intl.PluralRules.prototype.select() method returns a String indicating which plural rule to use for locale-aware formatting.

MDN documentation

impl PluralRules

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

The Intl.PluralRules object is a constructor for objects that enable plural sensitive formatting and plural language rules.

MDN documentation

impl PluralRules

fn select_range(&self, start: f64, end: f64) -> JsString

The Intl.PluralRules.prototype.selectRange() method returns a string indicating which plural rule to use for locale-aware formatting of a range of numbers.

MDN documentation

Trait Implementations

impl AsRef<JsValue> for PluralRules

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for PluralRules

fn as_ref(&self) -> &Object

impl AsRef<PluralRules> for PluralRules

fn as_ref(&self) -> &PluralRules

impl Clone for PluralRules

fn clone(&self) -> Self

impl Debug for PluralRules

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

impl Default for PluralRules

fn default() -> Self

impl Deref for PluralRules

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

impl ErasableGeneric for PluralRules

type Repr = JsValue;

impl From<JsValue> for PluralRules

fn from(obj: JsValue) -> Self

impl FromWasmAbi for PluralRules

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

impl IntoJsGeneric for PluralRules where PluralRules: JsGeneric,

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

impl IntoWasmAbi for PluralRules

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

impl JsCast for PluralRules

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

impl LongRefFromWasmAbi for PluralRules

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

impl OptionFromWasmAbi for PluralRules

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

impl OptionIntoWasmAbi for PluralRules

fn none() -> Self::Abi

impl Promising for PluralRules

type Resolution = PluralRules;

impl RefFromWasmAbi for PluralRules

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

impl UpcastFrom<PluralRules> for PluralRules

impl WasmDescribe for PluralRules

fn describe()

Auto Trait Implementations

impl Freeze for PluralRules

impl RefUnwindSafe for PluralRules

impl Send for PluralRules

impl Sync for PluralRules

impl Unpin for PluralRules

impl UnsafeUnpin for PluralRules

impl UnwindSafe for PluralRules

Blanket Implementations

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

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

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

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

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

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

impl<T> From<T> for PluralRules

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

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

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

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

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

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

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

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

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

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