Skip to main content

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