Struct DisplayNames

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

The Intl.DisplayNames object enables the consistent translation of language, region, and script display names.

MDN documentation

Implementations

impl DisplayNames

fn resolved_options(&self) -> Object

Returns an object with properties reflecting the options used.

MDN documentation

impl DisplayNames

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

Creates a new Intl.DisplayNames object.

MDN documentation

impl DisplayNames

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

Returns an array of supported locales.

MDN documentation

impl DisplayNames

fn of(&self, code: &str) -> Option<JsString>

Returns the display name for the given code.

Returns undefined if fallback is "none" and no name is available.

MDN documentation

Trait Implementations

impl AsRef<DisplayNames> for DisplayNames

fn as_ref(&self) -> &DisplayNames

impl AsRef<JsValue> for DisplayNames

fn as_ref(&self) -> &JsValue

impl AsRef<Object> for DisplayNames

fn as_ref(&self) -> &Object

impl Clone for DisplayNames

fn clone(&self) -> Self

impl Debug for DisplayNames

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

impl Deref for DisplayNames

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

impl ErasableGeneric for DisplayNames

type Repr = JsValue;

impl From<JsValue> for DisplayNames

fn from(obj: JsValue) -> Self

impl FromWasmAbi for DisplayNames

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

impl IntoJsGeneric for DisplayNames where DisplayNames: JsGeneric,

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

impl IntoWasmAbi for DisplayNames

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

impl JsCast for DisplayNames

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

impl LongRefFromWasmAbi for DisplayNames

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

impl OptionFromWasmAbi for DisplayNames

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

impl OptionIntoWasmAbi for DisplayNames

fn none() -> Self::Abi

impl Promising for DisplayNames

type Resolution = DisplayNames;

impl RefFromWasmAbi for DisplayNames

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

impl UpcastFrom<DisplayNames> for DisplayNames

impl WasmDescribe for DisplayNames

fn describe()

Auto Trait Implementations

impl Freeze for DisplayNames

impl RefUnwindSafe for DisplayNames

impl Send for DisplayNames

impl Sync for DisplayNames

impl Unpin for DisplayNames

impl UnsafeUnpin for DisplayNames

impl UnwindSafe for DisplayNames

Blanket Implementations

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

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

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

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

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

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

impl<T> From<T> for DisplayNames

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

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

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

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

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

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

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

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

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

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