web_sys/features/
gen_UaDataValues.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = UADataValues)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `UaDataValues` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type UaDataValues;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `architecture` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "architecture")]
25 pub fn get_architecture(this: &UaDataValues) -> Option<::alloc::string::String>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `architecture` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "architecture")]
34 pub fn set_architecture(this: &UaDataValues, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `bitness` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "bitness")]
43 pub fn get_bitness(this: &UaDataValues) -> Option<::alloc::string::String>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `bitness` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "bitness")]
52 pub fn set_bitness(this: &UaDataValues, val: &str);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "NavigatorUaBrandVersion")]
55 #[doc = "Get the `brands` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaDataValues`*"]
58 #[doc = ""]
59 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
61 #[wasm_bindgen(method, getter = "brands")]
62 pub fn get_brands(this: &UaDataValues) -> Option<::js_sys::Array<NavigatorUaBrandVersion>>;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "NavigatorUaBrandVersion")]
65 #[doc = "Change the `brands` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaDataValues`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "brands")]
72 pub fn set_brands(this: &UaDataValues, val: &[NavigatorUaBrandVersion]);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `formFactors` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "formFactors")]
81 pub fn get_form_factors(this: &UaDataValues) -> Option<::js_sys::Array<::js_sys::JsString>>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `formFactors` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "formFactors")]
90 pub fn set_form_factors(this: &UaDataValues, val: &[::js_sys::JsString]);
91 #[cfg(web_sys_unstable_apis)]
92 #[cfg(feature = "NavigatorUaBrandVersion")]
93 #[doc = "Get the `fullVersionList` field of this object."]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaDataValues`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 #[wasm_bindgen(method, getter = "fullVersionList")]
100 pub fn get_full_version_list(
101 this: &UaDataValues,
102 ) -> Option<::js_sys::Array<NavigatorUaBrandVersion>>;
103 #[cfg(web_sys_unstable_apis)]
104 #[cfg(feature = "NavigatorUaBrandVersion")]
105 #[doc = "Change the `fullVersionList` field of this object."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaDataValues`*"]
108 #[doc = ""]
109 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
111 #[wasm_bindgen(method, setter = "fullVersionList")]
112 pub fn set_full_version_list(this: &UaDataValues, val: &[NavigatorUaBrandVersion]);
113 #[cfg(web_sys_unstable_apis)]
114 #[doc = "Get the `mobile` field of this object."]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
117 #[doc = ""]
118 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
119 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
120 #[wasm_bindgen(method, getter = "mobile")]
121 pub fn get_mobile(this: &UaDataValues) -> Option<bool>;
122 #[cfg(web_sys_unstable_apis)]
123 #[doc = "Change the `mobile` field of this object."]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
126 #[doc = ""]
127 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
128 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
129 #[wasm_bindgen(method, setter = "mobile")]
130 pub fn set_mobile(this: &UaDataValues, val: bool);
131 #[cfg(web_sys_unstable_apis)]
132 #[doc = "Get the `model` field of this object."]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
135 #[doc = ""]
136 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138 #[wasm_bindgen(method, getter = "model")]
139 pub fn get_model(this: &UaDataValues) -> Option<::alloc::string::String>;
140 #[cfg(web_sys_unstable_apis)]
141 #[doc = "Change the `model` field of this object."]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
144 #[doc = ""]
145 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
146 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
147 #[wasm_bindgen(method, setter = "model")]
148 pub fn set_model(this: &UaDataValues, val: &str);
149 #[cfg(web_sys_unstable_apis)]
150 #[doc = "Get the `platform` field of this object."]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
153 #[doc = ""]
154 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
155 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
156 #[wasm_bindgen(method, getter = "platform")]
157 pub fn get_platform(this: &UaDataValues) -> Option<::alloc::string::String>;
158 #[cfg(web_sys_unstable_apis)]
159 #[doc = "Change the `platform` field of this object."]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
162 #[doc = ""]
163 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
164 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
165 #[wasm_bindgen(method, setter = "platform")]
166 pub fn set_platform(this: &UaDataValues, val: &str);
167 #[cfg(web_sys_unstable_apis)]
168 #[doc = "Get the `platformVersion` field of this object."]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
171 #[doc = ""]
172 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
173 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
174 #[wasm_bindgen(method, getter = "platformVersion")]
175 pub fn get_platform_version(this: &UaDataValues) -> Option<::alloc::string::String>;
176 #[cfg(web_sys_unstable_apis)]
177 #[doc = "Change the `platformVersion` field of this object."]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
180 #[doc = ""]
181 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
183 #[wasm_bindgen(method, setter = "platformVersion")]
184 pub fn set_platform_version(this: &UaDataValues, val: &str);
185 #[cfg(web_sys_unstable_apis)]
186 #[doc = "Get the `wow64` field of this object."]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
189 #[doc = ""]
190 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
191 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
192 #[wasm_bindgen(method, getter = "wow64")]
193 pub fn get_wow64(this: &UaDataValues) -> Option<bool>;
194 #[cfg(web_sys_unstable_apis)]
195 #[doc = "Change the `wow64` field of this object."]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
198 #[doc = ""]
199 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
200 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
201 #[wasm_bindgen(method, setter = "wow64")]
202 pub fn set_wow64(this: &UaDataValues, val: bool);
203}
204#[cfg(web_sys_unstable_apis)]
205impl UaDataValues {
206 #[doc = "Construct a new `UaDataValues`."]
207 #[doc = ""]
208 #[doc = "*This API requires the following crate features to be activated: `UaDataValues`*"]
209 #[doc = ""]
210 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
211 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
212 pub fn new() -> Self {
213 #[allow(unused_mut)]
214 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
215 ret
216 }
217 #[cfg(web_sys_unstable_apis)]
218 #[deprecated = "Use `set_architecture()` instead."]
219 pub fn architecture(&mut self, val: &str) -> &mut Self {
220 self.set_architecture(val);
221 self
222 }
223 #[cfg(web_sys_unstable_apis)]
224 #[deprecated = "Use `set_bitness()` instead."]
225 pub fn bitness(&mut self, val: &str) -> &mut Self {
226 self.set_bitness(val);
227 self
228 }
229 #[cfg(web_sys_unstable_apis)]
230 #[cfg(feature = "NavigatorUaBrandVersion")]
231 #[deprecated = "Use `set_brands()` instead."]
232 pub fn brands(&mut self, val: &[NavigatorUaBrandVersion]) -> &mut Self {
233 self.set_brands(val);
234 self
235 }
236 #[cfg(web_sys_unstable_apis)]
237 #[deprecated = "Use `set_form_factors()` instead."]
238 pub fn form_factors(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
239 self.set_form_factors(val);
240 self
241 }
242 #[cfg(web_sys_unstable_apis)]
243 #[cfg(feature = "NavigatorUaBrandVersion")]
244 #[deprecated = "Use `set_full_version_list()` instead."]
245 pub fn full_version_list(&mut self, val: &[NavigatorUaBrandVersion]) -> &mut Self {
246 self.set_full_version_list(val);
247 self
248 }
249 #[cfg(web_sys_unstable_apis)]
250 #[deprecated = "Use `set_mobile()` instead."]
251 pub fn mobile(&mut self, val: bool) -> &mut Self {
252 self.set_mobile(val);
253 self
254 }
255 #[cfg(web_sys_unstable_apis)]
256 #[deprecated = "Use `set_model()` instead."]
257 pub fn model(&mut self, val: &str) -> &mut Self {
258 self.set_model(val);
259 self
260 }
261 #[cfg(web_sys_unstable_apis)]
262 #[deprecated = "Use `set_platform()` instead."]
263 pub fn platform(&mut self, val: &str) -> &mut Self {
264 self.set_platform(val);
265 self
266 }
267 #[cfg(web_sys_unstable_apis)]
268 #[deprecated = "Use `set_platform_version()` instead."]
269 pub fn platform_version(&mut self, val: &str) -> &mut Self {
270 self.set_platform_version(val);
271 self
272 }
273 #[cfg(web_sys_unstable_apis)]
274 #[deprecated = "Use `set_wow64()` instead."]
275 pub fn wow64(&mut self, val: bool) -> &mut Self {
276 self.set_wow64(val);
277 self
278 }
279}
280#[cfg(web_sys_unstable_apis)]
281impl Default for UaDataValues {
282 fn default() -> Self {
283 Self::new()
284 }
285}