web_sys/features/
gen_LockInfo.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 = LockInfo)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `LockInfo` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type LockInfo;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `clientId` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "clientId")]
25 pub fn get_client_id(this: &LockInfo) -> Option<::alloc::string::String>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `clientId` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "clientId")]
34 pub fn set_client_id(this: &LockInfo, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "LockMode")]
37 #[doc = "Get the `mode` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"]
40 #[doc = ""]
41 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43 #[wasm_bindgen(method, getter = "mode")]
44 pub fn get_mode(this: &LockInfo) -> Option<LockMode>;
45 #[cfg(web_sys_unstable_apis)]
46 #[cfg(feature = "LockMode")]
47 #[doc = "Change the `mode` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "mode")]
54 pub fn set_mode(this: &LockInfo, val: LockMode);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `name` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "name")]
63 pub fn get_name(this: &LockInfo) -> Option<::alloc::string::String>;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `name` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "name")]
72 pub fn set_name(this: &LockInfo, val: &str);
73}
74#[cfg(web_sys_unstable_apis)]
75impl LockInfo {
76 #[doc = "Construct a new `LockInfo`."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"]
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://rustwasm.github.io/docs/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 #[deprecated = "Use `set_client_id()` instead."]
89 pub fn client_id(&mut self, val: &str) -> &mut Self {
90 self.set_client_id(val);
91 self
92 }
93 #[cfg(web_sys_unstable_apis)]
94 #[cfg(feature = "LockMode")]
95 #[deprecated = "Use `set_mode()` instead."]
96 pub fn mode(&mut self, val: LockMode) -> &mut Self {
97 self.set_mode(val);
98 self
99 }
100 #[cfg(web_sys_unstable_apis)]
101 #[deprecated = "Use `set_name()` instead."]
102 pub fn name(&mut self, val: &str) -> &mut Self {
103 self.set_name(val);
104 self
105 }
106}
107#[cfg(web_sys_unstable_apis)]
108impl Default for LockInfo {
109 fn default() -> Self {
110 Self::new()
111 }
112}