web_sys/features/
gen_IdbTransaction.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = IDBTransaction , typescript_type = "IDBTransaction")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `IdbTransaction` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
14    pub type IdbTransaction;
15    #[cfg(feature = "DomStringList")]
16    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = objectStoreNames)]
17    #[doc = "Getter for the `objectStoreNames` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/objectStoreNames)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `DomStringList`, `IdbTransaction`*"]
22    pub fn object_store_names(this: &IdbTransaction) -> DomStringList;
23    #[cfg(feature = "IdbTransactionMode")]
24    # [wasm_bindgen (structural , catch , method , getter , js_class = "IDBTransaction" , js_name = mode)]
25    #[doc = "Getter for the `mode` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/mode)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`, `IdbTransactionMode`*"]
30    pub fn mode(this: &IdbTransaction) -> Result<IdbTransactionMode, JsValue>;
31    #[cfg(feature = "IdbDatabase")]
32    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = db)]
33    #[doc = "Getter for the `db` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/db)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `IdbDatabase`, `IdbTransaction`*"]
38    pub fn db(this: &IdbTransaction) -> IdbDatabase;
39    #[cfg(feature = "DomException")]
40    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = error)]
41    #[doc = "Getter for the `error` field of this object."]
42    #[doc = ""]
43    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/error)"]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `DomException`, `IdbTransaction`*"]
46    pub fn error(this: &IdbTransaction) -> Option<DomException>;
47    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = onabort)]
48    #[doc = "Getter for the `onabort` field of this object."]
49    #[doc = ""]
50    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/onabort)"]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
53    pub fn onabort(this: &IdbTransaction) -> Option<::js_sys::Function>;
54    # [wasm_bindgen (structural , method , setter , js_class = "IDBTransaction" , js_name = onabort)]
55    #[doc = "Setter for the `onabort` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/onabort)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
60    pub fn set_onabort(this: &IdbTransaction, value: Option<&::js_sys::Function>);
61    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = oncomplete)]
62    #[doc = "Getter for the `oncomplete` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/oncomplete)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
67    pub fn oncomplete(this: &IdbTransaction) -> Option<::js_sys::Function>;
68    # [wasm_bindgen (structural , method , setter , js_class = "IDBTransaction" , js_name = oncomplete)]
69    #[doc = "Setter for the `oncomplete` field of this object."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/oncomplete)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
74    pub fn set_oncomplete(this: &IdbTransaction, value: Option<&::js_sys::Function>);
75    # [wasm_bindgen (structural , method , getter , js_class = "IDBTransaction" , js_name = onerror)]
76    #[doc = "Getter for the `onerror` field of this object."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/onerror)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
81    pub fn onerror(this: &IdbTransaction) -> Option<::js_sys::Function>;
82    # [wasm_bindgen (structural , method , setter , js_class = "IDBTransaction" , js_name = onerror)]
83    #[doc = "Setter for the `onerror` field of this object."]
84    #[doc = ""]
85    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/onerror)"]
86    #[doc = ""]
87    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
88    pub fn set_onerror(this: &IdbTransaction, value: Option<&::js_sys::Function>);
89    # [wasm_bindgen (catch , method , structural , js_class = "IDBTransaction" , js_name = abort)]
90    #[doc = "The `abort()` method."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
95    pub fn abort(this: &IdbTransaction) -> Result<(), JsValue>;
96    # [wasm_bindgen (catch , method , structural , js_class = "IDBTransaction" , js_name = commit)]
97    #[doc = "The `commit()` method."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/commit)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `IdbTransaction`*"]
102    #[deprecated]
103    pub fn commit(this: &IdbTransaction) -> Result<(), JsValue>;
104    #[cfg(feature = "IdbObjectStore")]
105    # [wasm_bindgen (catch , method , structural , js_class = "IDBTransaction" , js_name = objectStore)]
106    #[doc = "The `objectStore()` method."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/objectStore)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `IdbObjectStore`, `IdbTransaction`*"]
111    pub fn object_store(this: &IdbTransaction, name: &str) -> Result<IdbObjectStore, JsValue>;
112}