Skip to main content

web_sys/features/
gen_UaLowEntropyJson.rs

1#![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 = UALowEntropyJSON)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `UaLowEntropyJson` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
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 UaLowEntropyJson;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "NavigatorUaBrandVersion")]
19    #[doc = "Get the `brands` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaLowEntropyJson`*"]
22    #[doc = ""]
23    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
25    #[wasm_bindgen(method, getter = "brands")]
26    pub fn get_brands(this: &UaLowEntropyJson) -> Option<::js_sys::Array<NavigatorUaBrandVersion>>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "NavigatorUaBrandVersion")]
29    #[doc = "Change the `brands` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `NavigatorUaBrandVersion`, `UaLowEntropyJson`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    #[wasm_bindgen(method, setter = "brands")]
36    pub fn set_brands(this: &UaLowEntropyJson, val: &[NavigatorUaBrandVersion]);
37    #[cfg(web_sys_unstable_apis)]
38    #[doc = "Get the `mobile` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    #[wasm_bindgen(method, getter = "mobile")]
45    pub fn get_mobile(this: &UaLowEntropyJson) -> Option<bool>;
46    #[cfg(web_sys_unstable_apis)]
47    #[doc = "Change the `mobile` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "mobile")]
54    pub fn set_mobile(this: &UaLowEntropyJson, val: bool);
55    #[cfg(web_sys_unstable_apis)]
56    #[doc = "Get the `platform` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
59    #[doc = ""]
60    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62    #[wasm_bindgen(method, getter = "platform")]
63    pub fn get_platform(this: &UaLowEntropyJson) -> Option<::alloc::string::String>;
64    #[cfg(web_sys_unstable_apis)]
65    #[doc = "Change the `platform` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
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 = "platform")]
72    pub fn set_platform(this: &UaLowEntropyJson, val: &str);
73}
74#[cfg(web_sys_unstable_apis)]
75impl UaLowEntropyJson {
76    #[doc = "Construct a new `UaLowEntropyJson`."]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `UaLowEntropyJson`*"]
79    #[doc = ""]
80    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82    pub fn new() -> Self {
83        #[allow(unused_mut)]
84        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
85        ret
86    }
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "NavigatorUaBrandVersion")]
89    #[deprecated = "Use `set_brands()` instead."]
90    pub fn brands(&mut self, val: &[NavigatorUaBrandVersion]) -> &mut Self {
91        self.set_brands(val);
92        self
93    }
94    #[cfg(web_sys_unstable_apis)]
95    #[deprecated = "Use `set_mobile()` instead."]
96    pub fn mobile(&mut self, val: bool) -> &mut Self {
97        self.set_mobile(val);
98        self
99    }
100    #[cfg(web_sys_unstable_apis)]
101    #[deprecated = "Use `set_platform()` instead."]
102    pub fn platform(&mut self, val: &str) -> &mut Self {
103        self.set_platform(val);
104        self
105    }
106}
107#[cfg(web_sys_unstable_apis)]
108impl Default for UaLowEntropyJson {
109    fn default() -> Self {
110        Self::new()
111    }
112}