web_sys/features/
gen_IdbRequest.rs1#![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 = "IDBRequest",
11 typescript_type = "IDBRequest"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `IdbRequest` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
19 pub type IdbRequest;
20 #[wasm_bindgen(catch, method, getter, js_class = "IDBRequest", js_name = "result")]
21 #[doc = "Getter for the `result` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/result)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
26 pub fn result(this: &IdbRequest) -> Result<::wasm_bindgen::JsValue, JsValue>;
27 #[cfg(feature = "DomException")]
28 #[wasm_bindgen(catch, method, getter, js_class = "IDBRequest", js_name = "error")]
29 #[doc = "Getter for the `error` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/error)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `DomException`, `IdbRequest`*"]
34 pub fn error(this: &IdbRequest) -> Result<Option<DomException>, JsValue>;
35 #[wasm_bindgen(method, getter, js_class = "IDBRequest", js_name = "source")]
36 #[doc = "Getter for the `source` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/source)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
41 pub fn source(this: &IdbRequest) -> Option<::js_sys::Object>;
42 #[cfg(feature = "IdbTransaction")]
43 #[wasm_bindgen(method, getter, js_class = "IDBRequest", js_name = "transaction")]
44 #[doc = "Getter for the `transaction` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/transaction)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`, `IdbTransaction`*"]
49 pub fn transaction(this: &IdbRequest) -> Option<IdbTransaction>;
50 #[cfg(feature = "IdbRequestReadyState")]
51 #[wasm_bindgen(method, getter, js_class = "IDBRequest", js_name = "readyState")]
52 #[doc = "Getter for the `readyState` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/readyState)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`, `IdbRequestReadyState`*"]
57 pub fn ready_state(this: &IdbRequest) -> IdbRequestReadyState;
58 #[wasm_bindgen(method, getter, js_class = "IDBRequest", js_name = "onsuccess")]
59 #[doc = "Getter for the `onsuccess` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onsuccess)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
64 pub fn onsuccess(this: &IdbRequest) -> Option<::js_sys::Function>;
65 #[wasm_bindgen(method, setter, js_class = "IDBRequest", js_name = "onsuccess")]
66 #[doc = "Setter for the `onsuccess` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onsuccess)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
71 pub fn set_onsuccess(this: &IdbRequest, value: Option<&::js_sys::Function>);
72 #[wasm_bindgen(method, getter, js_class = "IDBRequest", js_name = "onerror")]
73 #[doc = "Getter for the `onerror` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onerror)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
78 pub fn onerror(this: &IdbRequest) -> Option<::js_sys::Function>;
79 #[wasm_bindgen(method, setter, js_class = "IDBRequest", js_name = "onerror")]
80 #[doc = "Setter for the `onerror` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/IDBRequest/onerror)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `IdbRequest`*"]
85 pub fn set_onerror(this: &IdbRequest, value: Option<&::js_sys::Function>);
86}