web_sys/features/
gen_CacheQueryOptions.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 = CacheQueryOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CacheQueryOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
12 pub type CacheQueryOptions;
13 #[doc = "Get the `cacheName` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
16 #[wasm_bindgen(method, getter = "cacheName")]
17 pub fn get_cache_name(this: &CacheQueryOptions) -> Option<::alloc::string::String>;
18 #[doc = "Change the `cacheName` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
21 #[wasm_bindgen(method, setter = "cacheName")]
22 pub fn set_cache_name(this: &CacheQueryOptions, val: &str);
23 #[doc = "Get the `ignoreMethod` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
26 #[wasm_bindgen(method, getter = "ignoreMethod")]
27 pub fn get_ignore_method(this: &CacheQueryOptions) -> Option<bool>;
28 #[doc = "Change the `ignoreMethod` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
31 #[wasm_bindgen(method, setter = "ignoreMethod")]
32 pub fn set_ignore_method(this: &CacheQueryOptions, val: bool);
33 #[doc = "Get the `ignoreSearch` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
36 #[wasm_bindgen(method, getter = "ignoreSearch")]
37 pub fn get_ignore_search(this: &CacheQueryOptions) -> Option<bool>;
38 #[doc = "Change the `ignoreSearch` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
41 #[wasm_bindgen(method, setter = "ignoreSearch")]
42 pub fn set_ignore_search(this: &CacheQueryOptions, val: bool);
43 #[doc = "Get the `ignoreVary` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
46 #[wasm_bindgen(method, getter = "ignoreVary")]
47 pub fn get_ignore_vary(this: &CacheQueryOptions) -> Option<bool>;
48 #[doc = "Change the `ignoreVary` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
51 #[wasm_bindgen(method, setter = "ignoreVary")]
52 pub fn set_ignore_vary(this: &CacheQueryOptions, val: bool);
53}
54impl CacheQueryOptions {
55 #[doc = "Construct a new `CacheQueryOptions`."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"]
58 pub fn new() -> Self {
59 #[allow(unused_mut)]
60 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
61 ret
62 }
63 #[deprecated = "Use `set_cache_name()` instead."]
64 pub fn cache_name(&mut self, val: &str) -> &mut Self {
65 self.set_cache_name(val);
66 self
67 }
68 #[deprecated = "Use `set_ignore_method()` instead."]
69 pub fn ignore_method(&mut self, val: bool) -> &mut Self {
70 self.set_ignore_method(val);
71 self
72 }
73 #[deprecated = "Use `set_ignore_search()` instead."]
74 pub fn ignore_search(&mut self, val: bool) -> &mut Self {
75 self.set_ignore_search(val);
76 self
77 }
78 #[deprecated = "Use `set_ignore_vary()` instead."]
79 pub fn ignore_vary(&mut self, val: bool) -> &mut Self {
80 self.set_ignore_vary(val);
81 self
82 }
83}
84impl Default for CacheQueryOptions {
85 fn default() -> Self {
86 Self::new()
87 }
88}