web_sys/features/
gen_DisplayNameResult.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = DisplayNameResult)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DisplayNameResult` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
12 pub type DisplayNameResult;
13 #[doc = "Get the `locale` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
16 #[wasm_bindgen(method, getter = "locale")]
17 pub fn get_locale(this: &DisplayNameResult) -> Option<::alloc::string::String>;
18 #[doc = "Change the `locale` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
21 #[wasm_bindgen(method, setter = "locale")]
22 pub fn set_locale(this: &DisplayNameResult, val: &str);
23 #[doc = "Get the `style` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
26 #[wasm_bindgen(method, getter = "style")]
27 pub fn get_style(this: &DisplayNameResult) -> Option<::alloc::string::String>;
28 #[doc = "Change the `style` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
31 #[wasm_bindgen(method, setter = "style")]
32 pub fn set_style(this: &DisplayNameResult, val: &str);
33 #[doc = "Get the `values` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
36 #[wasm_bindgen(method, getter = "values")]
37 pub fn get_values(this: &DisplayNameResult) -> Option<::js_sys::Object>;
38 #[doc = "Change the `values` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
41 #[wasm_bindgen(method, setter = "values")]
42 pub fn set_values(this: &DisplayNameResult, val: &::js_sys::Object);
43}
44impl DisplayNameResult {
45 #[doc = "Construct a new `DisplayNameResult`."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"]
48 pub fn new() -> Self {
49 #[allow(unused_mut)]
50 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
51 ret
52 }
53 #[deprecated = "Use `set_locale()` instead."]
54 pub fn locale(&mut self, val: &str) -> &mut Self {
55 self.set_locale(val);
56 self
57 }
58 #[deprecated = "Use `set_style()` instead."]
59 pub fn style(&mut self, val: &str) -> &mut Self {
60 self.set_style(val);
61 self
62 }
63 #[deprecated = "Use `set_values()` instead."]
64 pub fn values(&mut self, val: &::js_sys::Object) -> &mut Self {
65 self.set_values(val);
66 self
67 }
68}
69impl Default for DisplayNameResult {
70 fn default() -> Self {
71 Self::new()
72 }
73}