Skip to main content

web_sys/features/
gen_CacheStorage.rs

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