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