Struct DisplayNames
#[repr(transparent)]
pub struct DisplayNames { /* private fields */ }
The Intl.DisplayNames object enables the consistent translation of
language, region, and script display names.
Implementations
impl DisplayNames
fn resolved_options(&self) -> ObjectReturns an object with properties reflecting the options used.
impl DisplayNames
fn new(locales: &Array, options: &Object) -> DisplayNamesCreates a new
Intl.DisplayNamesobject.
impl DisplayNames
fn supported_locales_of(locales: &Array, options: &Object) -> ArrayReturns an array of supported locales.
impl DisplayNames
fn of(&self, code: &str) -> Option<JsString>Returns the display name for the given code.
Returns
undefinedif fallback is "none" and no name is available.
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) -> boolfn unchecked_from_js(val: JsValue) -> Selffn 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()