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 = "IDBIndex",
10 typescript_type = "IDBIndex"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `IdbIndex` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
18 pub type IdbIndex;
19 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "name")]
20 #[doc = "Getter for the `name` field of this object."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/name)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
25 pub fn name(this: &IdbIndex) -> ::alloc::string::String;
26 #[wasm_bindgen(method, setter, js_class = "IDBIndex", js_name = "name")]
27 #[doc = "Setter for the `name` field of this object."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/name)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
32 pub fn set_name(this: &IdbIndex, value: &str);
33 #[cfg(feature = "IdbObjectStore")]
34 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "objectStore")]
35 #[doc = "Getter for the `objectStore` field of this object."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/objectStore)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
40 pub fn object_store(this: &IdbIndex) -> IdbObjectStore;
41 #[wasm_bindgen(catch, method, getter, js_class = "IDBIndex", js_name = "keyPath")]
42 #[doc = "Getter for the `keyPath` field of this object."]
43 #[doc = ""]
44 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/keyPath)"]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
47 pub fn key_path(this: &IdbIndex) -> Result<::wasm_bindgen::JsValue, JsValue>;
48 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "multiEntry")]
49 #[doc = "Getter for the `multiEntry` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/multiEntry)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
54 pub fn multi_entry(this: &IdbIndex) -> bool;
55 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "unique")]
56 #[doc = "Getter for the `unique` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/unique)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
61 pub fn unique(this: &IdbIndex) -> bool;
62 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "locale")]
63 #[doc = "Getter for the `locale` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/locale)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
68 #[deprecated]
69 pub fn locale(this: &IdbIndex) -> Option<::alloc::string::String>;
70 #[wasm_bindgen(method, getter, js_class = "IDBIndex", js_name = "isAutoLocale")]
71 #[doc = "Getter for the `isAutoLocale` field of this object."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/isAutoLocale)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`*"]
76 #[deprecated]
77 pub fn is_auto_locale(this: &IdbIndex) -> bool;
78 #[cfg(feature = "IdbRequest")]
79 #[wasm_bindgen(catch, method, js_class = "IDBIndex")]
80 #[doc = "The `count()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/count)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
85 pub fn count(this: &IdbIndex) -> Result<IdbRequest, JsValue>;
86 #[cfg(feature = "IdbRequest")]
87 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "count")]
88 #[doc = "The `count()` method."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/count)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
93 pub fn count_with_key(
94 this: &IdbIndex,
95 query: &::wasm_bindgen::JsValue,
96 ) -> Result<IdbRequest, JsValue>;
97 #[cfg(feature = "IdbRequest")]
98 #[wasm_bindgen(catch, method, js_class = "IDBIndex")]
99 #[doc = "The `get()` method."]
100 #[doc = ""]
101 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/get)"]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
104 pub fn get(this: &IdbIndex, query: &::wasm_bindgen::JsValue) -> Result<IdbRequest, JsValue>;
105 #[cfg(feature = "IdbRequest")]
106 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAll")]
107 #[doc = "The `getAll()` method."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAll)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
112 pub fn get_all(this: &IdbIndex) -> Result<IdbRequest, JsValue>;
113 #[cfg(feature = "IdbRequest")]
114 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAll")]
115 #[doc = "The `getAll()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAll)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
120 pub fn get_all_with_key(
121 this: &IdbIndex,
122 query: &::wasm_bindgen::JsValue,
123 ) -> Result<IdbRequest, JsValue>;
124 #[cfg(feature = "IdbRequest")]
125 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAll")]
126 #[doc = "The `getAll()` method."]
127 #[doc = ""]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAll)"]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
131 pub fn get_all_with_key_and_limit(
132 this: &IdbIndex,
133 query: &::wasm_bindgen::JsValue,
134 count: u32,
135 ) -> Result<IdbRequest, JsValue>;
136 #[cfg(feature = "IdbRequest")]
137 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAllKeys")]
138 #[doc = "The `getAllKeys()` method."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAllKeys)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
143 pub fn get_all_keys(this: &IdbIndex) -> Result<IdbRequest, JsValue>;
144 #[cfg(feature = "IdbRequest")]
145 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAllKeys")]
146 #[doc = "The `getAllKeys()` method."]
147 #[doc = ""]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAllKeys)"]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
151 pub fn get_all_keys_with_key(
152 this: &IdbIndex,
153 query: &::wasm_bindgen::JsValue,
154 ) -> Result<IdbRequest, JsValue>;
155 #[cfg(feature = "IdbRequest")]
156 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getAllKeys")]
157 #[doc = "The `getAllKeys()` method."]
158 #[doc = ""]
159 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getAllKeys)"]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
162 pub fn get_all_keys_with_key_and_limit(
163 this: &IdbIndex,
164 query: &::wasm_bindgen::JsValue,
165 count: u32,
166 ) -> Result<IdbRequest, JsValue>;
167 #[cfg(feature = "IdbRequest")]
168 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "getKey")]
169 #[doc = "The `getKey()` method."]
170 #[doc = ""]
171 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/getKey)"]
172 #[doc = ""]
173 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
174 pub fn get_key(this: &IdbIndex, query: &::wasm_bindgen::JsValue)
175 -> Result<IdbRequest, JsValue>;
176 #[cfg(feature = "IdbRequest")]
177 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openCursor")]
178 #[doc = "The `openCursor()` method."]
179 #[doc = ""]
180 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openCursor)"]
181 #[doc = ""]
182 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
183 pub fn open_cursor(this: &IdbIndex) -> Result<IdbRequest, JsValue>;
184 #[cfg(feature = "IdbRequest")]
185 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openCursor")]
186 #[doc = "The `openCursor()` method."]
187 #[doc = ""]
188 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openCursor)"]
189 #[doc = ""]
190 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
191 pub fn open_cursor_with_range(
192 this: &IdbIndex,
193 query: &::wasm_bindgen::JsValue,
194 ) -> Result<IdbRequest, JsValue>;
195 #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
196 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openCursor")]
197 #[doc = "The `openCursor()` method."]
198 #[doc = ""]
199 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openCursor)"]
200 #[doc = ""]
201 #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbIndex`, `IdbRequest`*"]
202 pub fn open_cursor_with_range_and_direction(
203 this: &IdbIndex,
204 query: &::wasm_bindgen::JsValue,
205 direction: IdbCursorDirection,
206 ) -> Result<IdbRequest, JsValue>;
207 #[cfg(feature = "IdbRequest")]
208 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openKeyCursor")]
209 #[doc = "The `openKeyCursor()` method."]
210 #[doc = ""]
211 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openKeyCursor)"]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
214 pub fn open_key_cursor(this: &IdbIndex) -> Result<IdbRequest, JsValue>;
215 #[cfg(feature = "IdbRequest")]
216 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openKeyCursor")]
217 #[doc = "The `openKeyCursor()` method."]
218 #[doc = ""]
219 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openKeyCursor)"]
220 #[doc = ""]
221 #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbRequest`*"]
222 pub fn open_key_cursor_with_range(
223 this: &IdbIndex,
224 query: &::wasm_bindgen::JsValue,
225 ) -> Result<IdbRequest, JsValue>;
226 #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
227 #[wasm_bindgen(catch, method, js_class = "IDBIndex", js_name = "openKeyCursor")]
228 #[doc = "The `openKeyCursor()` method."]
229 #[doc = ""]
230 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBIndex/openKeyCursor)"]
231 #[doc = ""]
232 #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbIndex`, `IdbRequest`*"]
233 pub fn open_key_cursor_with_range_and_direction(
234 this: &IdbIndex,
235 query: &::wasm_bindgen::JsValue,
236 direction: IdbCursorDirection,
237 ) -> Result<IdbRequest, JsValue>;
238}