web_sys/features/
gen_CacheStorage.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = CacheStorage , typescript_type = "CacheStorage")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CacheStorage` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
14 pub type CacheStorage;
15 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = delete)]
16 #[doc = "The `delete()` method."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/delete)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
21 pub fn delete(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
22 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = has)]
23 #[doc = "The `has()` method."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/has)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
28 pub fn has(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
29 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = keys)]
30 #[doc = "The `keys()` method."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/keys)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
35 pub fn keys(this: &CacheStorage) -> ::js_sys::Promise;
36 #[cfg(feature = "Request")]
37 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = match)]
38 #[doc = "The `match()` method."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`, `Request`*"]
43 pub fn match_with_request(this: &CacheStorage, request: &Request) -> ::js_sys::Promise;
44 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = match)]
45 #[doc = "The `match()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
50 pub fn match_with_str(this: &CacheStorage, request: &str) -> ::js_sys::Promise;
51 #[cfg(all(feature = "CacheQueryOptions", feature = "Request",))]
52 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = match)]
53 #[doc = "The `match()` method."]
54 #[doc = ""]
55 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`, `CacheStorage`, `Request`*"]
58 pub fn match_with_request_and_options(
59 this: &CacheStorage,
60 request: &Request,
61 options: &CacheQueryOptions,
62 ) -> ::js_sys::Promise;
63 #[cfg(feature = "CacheQueryOptions")]
64 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = match)]
65 #[doc = "The `match()` method."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/match)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`, `CacheStorage`*"]
70 pub fn match_with_str_and_options(
71 this: &CacheStorage,
72 request: &str,
73 options: &CacheQueryOptions,
74 ) -> ::js_sys::Promise;
75 # [wasm_bindgen (method , structural , js_class = "CacheStorage" , js_name = open)]
76 #[doc = "The `open()` method."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage/open)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `CacheStorage`*"]
81 pub fn open(this: &CacheStorage, cache_name: &str) -> ::js_sys::Promise;
82}