maxcountryman_web_sys/features/
gen_IdbObjectStore.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = IDBObjectStore , typescript_type = "IDBObjectStore")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `IdbObjectStore` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
13    pub type IdbObjectStore;
14    # [wasm_bindgen (structural , method , getter , js_class = "IDBObjectStore" , js_name = name)]
15    #[doc = "Getter for the `name` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
20    pub fn name(this: &IdbObjectStore) -> String;
21    # [wasm_bindgen (structural , method , setter , js_class = "IDBObjectStore" , js_name = name)]
22    #[doc = "Setter for the `name` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/name)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
27    pub fn set_name(this: &IdbObjectStore, value: &str);
28    # [wasm_bindgen (structural , catch , method , getter , js_class = "IDBObjectStore" , js_name = keyPath)]
29    #[doc = "Getter for the `keyPath` field of this object."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/keyPath)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
34    pub fn key_path(this: &IdbObjectStore) -> Result<::wasm_bindgen::JsValue, JsValue>;
35    #[cfg(feature = "DomStringList")]
36    # [wasm_bindgen (structural , method , getter , js_class = "IDBObjectStore" , js_name = indexNames)]
37    #[doc = "Getter for the `indexNames` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/indexNames)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `DomStringList`, `IdbObjectStore`*"]
42    pub fn index_names(this: &IdbObjectStore) -> DomStringList;
43    #[cfg(feature = "IdbTransaction")]
44    # [wasm_bindgen (structural , method , getter , js_class = "IDBObjectStore" , js_name = transaction)]
45    #[doc = "Getter for the `transaction` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/transaction)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbTransaction`*"]
50    pub fn transaction(this: &IdbObjectStore) -> IdbTransaction;
51    # [wasm_bindgen (structural , method , getter , js_class = "IDBObjectStore" , js_name = autoIncrement)]
52    #[doc = "Getter for the `autoIncrement` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/autoIncrement)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
57    pub fn auto_increment(this: &IdbObjectStore) -> bool;
58    #[cfg(feature = "IdbRequest")]
59    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = add)]
60    #[doc = "The `add()` method."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
65    pub fn add(
66        this: &IdbObjectStore,
67        value: &::wasm_bindgen::JsValue,
68    ) -> Result<IdbRequest, JsValue>;
69    #[cfg(feature = "IdbRequest")]
70    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = add)]
71    #[doc = "The `add()` method."]
72    #[doc = ""]
73    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/add)"]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
76    pub fn add_with_key(
77        this: &IdbObjectStore,
78        value: &::wasm_bindgen::JsValue,
79        key: &::wasm_bindgen::JsValue,
80    ) -> Result<IdbRequest, JsValue>;
81    #[cfg(feature = "IdbRequest")]
82    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = clear)]
83    #[doc = "The `clear()` method."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/clear)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
88    pub fn clear(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
89    #[cfg(feature = "IdbRequest")]
90    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = count)]
91    #[doc = "The `count()` method."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
96    pub fn count(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
97    #[cfg(feature = "IdbRequest")]
98    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = count)]
99    #[doc = "The `count()` method."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/count)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
104    pub fn count_with_key(
105        this: &IdbObjectStore,
106        key: &::wasm_bindgen::JsValue,
107    ) -> Result<IdbRequest, JsValue>;
108    #[cfg(feature = "IdbIndex")]
109    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = createIndex)]
110    #[doc = "The `createIndex()` method."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
115    pub fn create_index_with_str(
116        this: &IdbObjectStore,
117        name: &str,
118        key_path: &str,
119    ) -> Result<IdbIndex, JsValue>;
120    #[cfg(feature = "IdbIndex")]
121    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = createIndex)]
122    #[doc = "The `createIndex()` method."]
123    #[doc = ""]
124    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
125    #[doc = ""]
126    #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
127    pub fn create_index_with_str_sequence(
128        this: &IdbObjectStore,
129        name: &str,
130        key_path: &::wasm_bindgen::JsValue,
131    ) -> Result<IdbIndex, JsValue>;
132    #[cfg(all(feature = "IdbIndex", feature = "IdbIndexParameters",))]
133    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = createIndex)]
134    #[doc = "The `createIndex()` method."]
135    #[doc = ""]
136    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
137    #[doc = ""]
138    #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbIndexParameters`, `IdbObjectStore`*"]
139    pub fn create_index_with_str_and_optional_parameters(
140        this: &IdbObjectStore,
141        name: &str,
142        key_path: &str,
143        optional_parameters: &IdbIndexParameters,
144    ) -> Result<IdbIndex, JsValue>;
145    #[cfg(all(feature = "IdbIndex", feature = "IdbIndexParameters",))]
146    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = createIndex)]
147    #[doc = "The `createIndex()` method."]
148    #[doc = ""]
149    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/createIndex)"]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbIndexParameters`, `IdbObjectStore`*"]
152    pub fn create_index_with_str_sequence_and_optional_parameters(
153        this: &IdbObjectStore,
154        name: &str,
155        key_path: &::wasm_bindgen::JsValue,
156        optional_parameters: &IdbIndexParameters,
157    ) -> Result<IdbIndex, JsValue>;
158    #[cfg(feature = "IdbRequest")]
159    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = delete)]
160    #[doc = "The `delete()` method."]
161    #[doc = ""]
162    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/delete)"]
163    #[doc = ""]
164    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
165    pub fn delete(
166        this: &IdbObjectStore,
167        key: &::wasm_bindgen::JsValue,
168    ) -> Result<IdbRequest, JsValue>;
169    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = deleteIndex)]
170    #[doc = "The `deleteIndex()` method."]
171    #[doc = ""]
172    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/deleteIndex)"]
173    #[doc = ""]
174    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`*"]
175    pub fn delete_index(this: &IdbObjectStore, index_name: &str) -> Result<(), JsValue>;
176    #[cfg(feature = "IdbRequest")]
177    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = get)]
178    #[doc = "The `get()` method."]
179    #[doc = ""]
180    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/get)"]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
183    pub fn get(this: &IdbObjectStore, key: &::wasm_bindgen::JsValue)
184        -> Result<IdbRequest, JsValue>;
185    #[cfg(feature = "IdbRequest")]
186    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAll)]
187    #[doc = "The `getAll()` method."]
188    #[doc = ""]
189    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
192    pub fn get_all(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
193    #[cfg(feature = "IdbRequest")]
194    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAll)]
195    #[doc = "The `getAll()` method."]
196    #[doc = ""]
197    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
198    #[doc = ""]
199    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
200    pub fn get_all_with_key(
201        this: &IdbObjectStore,
202        key: &::wasm_bindgen::JsValue,
203    ) -> Result<IdbRequest, JsValue>;
204    #[cfg(feature = "IdbRequest")]
205    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAll)]
206    #[doc = "The `getAll()` method."]
207    #[doc = ""]
208    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAll)"]
209    #[doc = ""]
210    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
211    pub fn get_all_with_key_and_limit(
212        this: &IdbObjectStore,
213        key: &::wasm_bindgen::JsValue,
214        limit: u32,
215    ) -> Result<IdbRequest, JsValue>;
216    #[cfg(feature = "IdbRequest")]
217    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAllKeys)]
218    #[doc = "The `getAllKeys()` method."]
219    #[doc = ""]
220    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
221    #[doc = ""]
222    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
223    pub fn get_all_keys(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
224    #[cfg(feature = "IdbRequest")]
225    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAllKeys)]
226    #[doc = "The `getAllKeys()` method."]
227    #[doc = ""]
228    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
229    #[doc = ""]
230    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
231    pub fn get_all_keys_with_key(
232        this: &IdbObjectStore,
233        key: &::wasm_bindgen::JsValue,
234    ) -> Result<IdbRequest, JsValue>;
235    #[cfg(feature = "IdbRequest")]
236    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getAllKeys)]
237    #[doc = "The `getAllKeys()` method."]
238    #[doc = ""]
239    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getAllKeys)"]
240    #[doc = ""]
241    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
242    pub fn get_all_keys_with_key_and_limit(
243        this: &IdbObjectStore,
244        key: &::wasm_bindgen::JsValue,
245        limit: u32,
246    ) -> Result<IdbRequest, JsValue>;
247    #[cfg(feature = "IdbRequest")]
248    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = getKey)]
249    #[doc = "The `getKey()` method."]
250    #[doc = ""]
251    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/getKey)"]
252    #[doc = ""]
253    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
254    pub fn get_key(
255        this: &IdbObjectStore,
256        key: &::wasm_bindgen::JsValue,
257    ) -> Result<IdbRequest, JsValue>;
258    #[cfg(feature = "IdbIndex")]
259    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = index)]
260    #[doc = "The `index()` method."]
261    #[doc = ""]
262    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/index)"]
263    #[doc = ""]
264    #[doc = "*This API requires the following crate features to be activated: `IdbIndex`, `IdbObjectStore`*"]
265    pub fn index(this: &IdbObjectStore, name: &str) -> Result<IdbIndex, JsValue>;
266    #[cfg(feature = "IdbRequest")]
267    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openCursor)]
268    #[doc = "The `openCursor()` method."]
269    #[doc = ""]
270    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
271    #[doc = ""]
272    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
273    pub fn open_cursor(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
274    #[cfg(feature = "IdbRequest")]
275    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openCursor)]
276    #[doc = "The `openCursor()` method."]
277    #[doc = ""]
278    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
279    #[doc = ""]
280    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
281    pub fn open_cursor_with_range(
282        this: &IdbObjectStore,
283        range: &::wasm_bindgen::JsValue,
284    ) -> Result<IdbRequest, JsValue>;
285    #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
286    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openCursor)]
287    #[doc = "The `openCursor()` method."]
288    #[doc = ""]
289    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor)"]
290    #[doc = ""]
291    #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbObjectStore`, `IdbRequest`*"]
292    pub fn open_cursor_with_range_and_direction(
293        this: &IdbObjectStore,
294        range: &::wasm_bindgen::JsValue,
295        direction: IdbCursorDirection,
296    ) -> Result<IdbRequest, JsValue>;
297    #[cfg(feature = "IdbRequest")]
298    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openKeyCursor)]
299    #[doc = "The `openKeyCursor()` method."]
300    #[doc = ""]
301    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
302    #[doc = ""]
303    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
304    pub fn open_key_cursor(this: &IdbObjectStore) -> Result<IdbRequest, JsValue>;
305    #[cfg(feature = "IdbRequest")]
306    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openKeyCursor)]
307    #[doc = "The `openKeyCursor()` method."]
308    #[doc = ""]
309    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
310    #[doc = ""]
311    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
312    pub fn open_key_cursor_with_range(
313        this: &IdbObjectStore,
314        range: &::wasm_bindgen::JsValue,
315    ) -> Result<IdbRequest, JsValue>;
316    #[cfg(all(feature = "IdbCursorDirection", feature = "IdbRequest",))]
317    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = openKeyCursor)]
318    #[doc = "The `openKeyCursor()` method."]
319    #[doc = ""]
320    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openKeyCursor)"]
321    #[doc = ""]
322    #[doc = "*This API requires the following crate features to be activated: `IdbCursorDirection`, `IdbObjectStore`, `IdbRequest`*"]
323    pub fn open_key_cursor_with_range_and_direction(
324        this: &IdbObjectStore,
325        range: &::wasm_bindgen::JsValue,
326        direction: IdbCursorDirection,
327    ) -> Result<IdbRequest, JsValue>;
328    #[cfg(feature = "IdbRequest")]
329    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = put)]
330    #[doc = "The `put()` method."]
331    #[doc = ""]
332    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put)"]
333    #[doc = ""]
334    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
335    pub fn put(
336        this: &IdbObjectStore,
337        value: &::wasm_bindgen::JsValue,
338    ) -> Result<IdbRequest, JsValue>;
339    #[cfg(feature = "IdbRequest")]
340    # [wasm_bindgen (catch , method , structural , js_class = "IDBObjectStore" , js_name = put)]
341    #[doc = "The `put()` method."]
342    #[doc = ""]
343    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/put)"]
344    #[doc = ""]
345    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbRequest`*"]
346    pub fn put_with_key(
347        this: &IdbObjectStore,
348        value: &::wasm_bindgen::JsValue,
349        key: &::wasm_bindgen::JsValue,
350    ) -> Result<IdbRequest, JsValue>;
351}