Skip to main content

web_sys/features/
gen_LockManagerSnapshot.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 = LockManagerSnapshot)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `LockManagerSnapshot` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"]
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 LockManagerSnapshot;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "LockInfo")]
19    #[doc = "Get the `held` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockManagerSnapshot`*"]
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 = "held")]
26    pub fn get_held(this: &LockManagerSnapshot) -> Option<::js_sys::Array<LockInfo>>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "LockInfo")]
29    #[doc = "Change the `held` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockManagerSnapshot`*"]
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 = "held")]
36    pub fn set_held(this: &LockManagerSnapshot, val: &[LockInfo]);
37    #[cfg(web_sys_unstable_apis)]
38    #[cfg(feature = "LockInfo")]
39    #[doc = "Get the `pending` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockManagerSnapshot`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[wasm_bindgen(method, getter = "pending")]
46    pub fn get_pending(this: &LockManagerSnapshot) -> Option<::js_sys::Array<LockInfo>>;
47    #[cfg(web_sys_unstable_apis)]
48    #[cfg(feature = "LockInfo")]
49    #[doc = "Change the `pending` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockManagerSnapshot`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    #[wasm_bindgen(method, setter = "pending")]
56    pub fn set_pending(this: &LockManagerSnapshot, val: &[LockInfo]);
57}
58#[cfg(web_sys_unstable_apis)]
59impl LockManagerSnapshot {
60    #[doc = "Construct a new `LockManagerSnapshot`."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"]
63    #[doc = ""]
64    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66    pub fn new() -> Self {
67        #[allow(unused_mut)]
68        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
69        ret
70    }
71    #[cfg(web_sys_unstable_apis)]
72    #[cfg(feature = "LockInfo")]
73    #[deprecated = "Use `set_held()` instead."]
74    pub fn held(&mut self, val: &[LockInfo]) -> &mut Self {
75        self.set_held(val);
76        self
77    }
78    #[cfg(web_sys_unstable_apis)]
79    #[cfg(feature = "LockInfo")]
80    #[deprecated = "Use `set_pending()` instead."]
81    pub fn pending(&mut self, val: &[LockInfo]) -> &mut Self {
82        self.set_pending(val);
83        self
84    }
85}
86#[cfg(web_sys_unstable_apis)]
87impl Default for LockManagerSnapshot {
88    fn default() -> Self {
89        Self::new()
90    }
91}