web_sys/features/
gen_AbortSignal.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 = AbortSignal , typescript_type = "AbortSignal")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `AbortSignal` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
14    pub type AbortSignal;
15    # [wasm_bindgen (structural , method , getter , js_class = "AbortSignal" , js_name = aborted)]
16    #[doc = "Getter for the `aborted` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/aborted)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
21    pub fn aborted(this: &AbortSignal) -> bool;
22    # [wasm_bindgen (structural , method , getter , js_class = "AbortSignal" , js_name = reason)]
23    #[doc = "Getter for the `reason` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/reason)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
28    pub fn reason(this: &AbortSignal) -> ::wasm_bindgen::JsValue;
29    # [wasm_bindgen (structural , method , getter , js_class = "AbortSignal" , js_name = onabort)]
30    #[doc = "Getter for the `onabort` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/onabort)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
35    pub fn onabort(this: &AbortSignal) -> Option<::js_sys::Function>;
36    # [wasm_bindgen (structural , method , setter , js_class = "AbortSignal" , js_name = onabort)]
37    #[doc = "Setter for the `onabort` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/onabort)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
42    pub fn set_onabort(this: &AbortSignal, value: Option<&::js_sys::Function>);
43    # [wasm_bindgen (static_method_of = AbortSignal , js_class = "AbortSignal" , js_name = abort)]
44    #[doc = "The `abort()` method."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/abort_static)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
49    pub fn abort() -> AbortSignal;
50    # [wasm_bindgen (static_method_of = AbortSignal , js_class = "AbortSignal" , js_name = abort)]
51    #[doc = "The `abort()` method."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/abort_static)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
56    pub fn abort_with_reason(reason: &::wasm_bindgen::JsValue) -> AbortSignal;
57    # [wasm_bindgen (static_method_of = AbortSignal , js_class = "AbortSignal" , js_name = any)]
58    #[doc = "The `any()` method."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
63    pub fn any(signals: &::wasm_bindgen::JsValue) -> AbortSignal;
64    # [wasm_bindgen (method , structural , js_class = "AbortSignal" , js_name = throwIfAborted)]
65    #[doc = "The `throwIfAborted()` method."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/throwIfAborted)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
70    pub fn throw_if_aborted(this: &AbortSignal);
71    # [wasm_bindgen (static_method_of = AbortSignal , js_class = "AbortSignal" , js_name = timeout)]
72    #[doc = "The `timeout()` method."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
77    pub fn timeout_with_u32(milliseconds: u32) -> AbortSignal;
78    # [wasm_bindgen (static_method_of = AbortSignal , js_class = "AbortSignal" , js_name = timeout)]
79    #[doc = "The `timeout()` method."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`*"]
84    pub fn timeout_with_f64(milliseconds: f64) -> AbortSignal;
85}