Skip to main content

web_sys/features/
gen_LockManager.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 = LockManager , typescript_type = "LockManager")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `LockManager` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/LockManager)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `LockManager`*"]
15    #[doc = ""]
16    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type LockManager;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "LockManagerSnapshot")]
21    # [wasm_bindgen (method , structural , js_class = "LockManager" , js_name = query)]
22    #[doc = "The `query()` method."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/LockManager/query)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `LockManager`, `LockManagerSnapshot`*"]
27    #[doc = ""]
28    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
30    pub fn query(this: &LockManager) -> ::js_sys::Promise<LockManagerSnapshot>;
31    #[cfg(web_sys_unstable_apis)]
32    #[cfg(feature = "Lock")]
33    # [wasm_bindgen (method , structural , js_class = "LockManager" , js_name = request)]
34    #[doc = "The `request()` method."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `Lock`, `LockManager`*"]
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    pub fn request_with_callback(
43        this: &LockManager,
44        name: &str,
45        callback: &::js_sys::Function<fn(::js_sys::JsOption<Lock>) -> ::js_sys::Promise>,
46    ) -> ::js_sys::Promise;
47    #[cfg(web_sys_unstable_apis)]
48    #[cfg(all(feature = "Lock", feature = "LockOptions",))]
49    # [wasm_bindgen (method , structural , js_class = "LockManager" , js_name = request)]
50    #[doc = "The `request()` method."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `Lock`, `LockManager`, `LockOptions`*"]
55    #[doc = ""]
56    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
58    pub fn request_with_options_and_callback(
59        this: &LockManager,
60        name: &str,
61        options: &LockOptions,
62        callback: &::js_sys::Function<fn(::js_sys::JsOption<Lock>) -> ::js_sys::Promise>,
63    ) -> ::js_sys::Promise;
64}