maxcountryman_web_sys/features/
gen_IdbDatabase.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = IDBDatabase , typescript_type = "IDBDatabase")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `IdbDatabase` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
13    pub type IdbDatabase;
14    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , 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/IDBDatabase/name)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
20    pub fn name(this: &IdbDatabase) -> String;
21    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = version)]
22    #[doc = "Getter for the `version` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/version)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
27    pub fn version(this: &IdbDatabase) -> f64;
28    #[cfg(feature = "DomStringList")]
29    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = objectStoreNames)]
30    #[doc = "Getter for the `objectStoreNames` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/objectStoreNames)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `DomStringList`, `IdbDatabase`*"]
35    pub fn object_store_names(this: &IdbDatabase) -> DomStringList;
36    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = onabort)]
37    #[doc = "Getter for the `onabort` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onabort)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
42    pub fn onabort(this: &IdbDatabase) -> Option<::js_sys::Function>;
43    # [wasm_bindgen (structural , method , setter , js_class = "IDBDatabase" , js_name = onabort)]
44    #[doc = "Setter for the `onabort` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onabort)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
49    pub fn set_onabort(this: &IdbDatabase, value: Option<&::js_sys::Function>);
50    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = onclose)]
51    #[doc = "Getter for the `onclose` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onclose)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
56    pub fn onclose(this: &IdbDatabase) -> Option<::js_sys::Function>;
57    # [wasm_bindgen (structural , method , setter , js_class = "IDBDatabase" , js_name = onclose)]
58    #[doc = "Setter for the `onclose` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onclose)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
63    pub fn set_onclose(this: &IdbDatabase, value: Option<&::js_sys::Function>);
64    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = onerror)]
65    #[doc = "Getter for the `onerror` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onerror)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
70    pub fn onerror(this: &IdbDatabase) -> Option<::js_sys::Function>;
71    # [wasm_bindgen (structural , method , setter , js_class = "IDBDatabase" , js_name = onerror)]
72    #[doc = "Setter for the `onerror` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onerror)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
77    pub fn set_onerror(this: &IdbDatabase, value: Option<&::js_sys::Function>);
78    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = onversionchange)]
79    #[doc = "Getter for the `onversionchange` field of this object."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
84    pub fn onversionchange(this: &IdbDatabase) -> Option<::js_sys::Function>;
85    # [wasm_bindgen (structural , method , setter , js_class = "IDBDatabase" , js_name = onversionchange)]
86    #[doc = "Setter for the `onversionchange` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/onversionchange)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
91    pub fn set_onversionchange(this: &IdbDatabase, value: Option<&::js_sys::Function>);
92    #[cfg(feature = "StorageType")]
93    # [wasm_bindgen (structural , method , getter , js_class = "IDBDatabase" , js_name = storage)]
94    #[doc = "Getter for the `storage` field of this object."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/storage)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `StorageType`*"]
99    pub fn storage(this: &IdbDatabase) -> StorageType;
100    # [wasm_bindgen (method , structural , js_class = "IDBDatabase" , js_name = close)]
101    #[doc = "The `close()` method."]
102    #[doc = ""]
103    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close)"]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
106    pub fn close(this: &IdbDatabase);
107    #[cfg(feature = "IdbRequest")]
108    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = createMutableFile)]
109    #[doc = "The `createMutableFile()` method."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createMutableFile)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbRequest`*"]
114    pub fn create_mutable_file(this: &IdbDatabase, name: &str) -> Result<IdbRequest, JsValue>;
115    #[cfg(feature = "IdbRequest")]
116    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = createMutableFile)]
117    #[doc = "The `createMutableFile()` method."]
118    #[doc = ""]
119    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createMutableFile)"]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbRequest`*"]
122    pub fn create_mutable_file_with_type(
123        this: &IdbDatabase,
124        name: &str,
125        type_: &str,
126    ) -> Result<IdbRequest, JsValue>;
127    #[cfg(feature = "IdbObjectStore")]
128    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = createObjectStore)]
129    #[doc = "The `createObjectStore()` method."]
130    #[doc = ""]
131    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore)"]
132    #[doc = ""]
133    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbObjectStore`*"]
134    pub fn create_object_store(this: &IdbDatabase, name: &str) -> Result<IdbObjectStore, JsValue>;
135    #[cfg(all(feature = "IdbObjectStore", feature = "IdbObjectStoreParameters",))]
136    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = createObjectStore)]
137    #[doc = "The `createObjectStore()` method."]
138    #[doc = ""]
139    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/createObjectStore)"]
140    #[doc = ""]
141    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbObjectStore`, `IdbObjectStoreParameters`*"]
142    pub fn create_object_store_with_optional_parameters(
143        this: &IdbDatabase,
144        name: &str,
145        optional_parameters: &IdbObjectStoreParameters,
146    ) -> Result<IdbObjectStore, JsValue>;
147    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = deleteObjectStore)]
148    #[doc = "The `deleteObjectStore()` method."]
149    #[doc = ""]
150    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/deleteObjectStore)"]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`*"]
153    pub fn delete_object_store(this: &IdbDatabase, name: &str) -> Result<(), JsValue>;
154    #[cfg(feature = "IdbTransaction")]
155    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = transaction)]
156    #[doc = "The `transaction()` method."]
157    #[doc = ""]
158    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction)"]
159    #[doc = ""]
160    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbTransaction`*"]
161    pub fn transaction_with_str(
162        this: &IdbDatabase,
163        store_names: &str,
164    ) -> Result<IdbTransaction, JsValue>;
165    #[cfg(feature = "IdbTransaction")]
166    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = transaction)]
167    #[doc = "The `transaction()` method."]
168    #[doc = ""]
169    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction)"]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbTransaction`*"]
172    pub fn transaction_with_str_sequence(
173        this: &IdbDatabase,
174        store_names: &::wasm_bindgen::JsValue,
175    ) -> Result<IdbTransaction, JsValue>;
176    #[cfg(all(feature = "IdbTransaction", feature = "IdbTransactionMode",))]
177    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = transaction)]
178    #[doc = "The `transaction()` method."]
179    #[doc = ""]
180    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction)"]
181    #[doc = ""]
182    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbTransaction`, `IdbTransactionMode`*"]
183    pub fn transaction_with_str_and_mode(
184        this: &IdbDatabase,
185        store_names: &str,
186        mode: IdbTransactionMode,
187    ) -> Result<IdbTransaction, JsValue>;
188    #[cfg(all(feature = "IdbTransaction", feature = "IdbTransactionMode",))]
189    # [wasm_bindgen (catch , method , structural , js_class = "IDBDatabase" , js_name = transaction)]
190    #[doc = "The `transaction()` method."]
191    #[doc = ""]
192    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction)"]
193    #[doc = ""]
194    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbTransaction`, `IdbTransactionMode`*"]
195    pub fn transaction_with_str_sequence_and_mode(
196        this: &IdbDatabase,
197        store_names: &::wasm_bindgen::JsValue,
198        mode: IdbTransactionMode,
199    ) -> Result<IdbTransaction, JsValue>;
200}