web_sys/features/
gen_SchedulerPostTaskOptions.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = SchedulerPostTaskOptions)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `SchedulerPostTaskOptions` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type SchedulerPostTaskOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `delay` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "delay")]
25    pub fn get_delay(this: &SchedulerPostTaskOptions) -> Option<f64>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `delay` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "delay")]
34    pub fn set_delay(this: &SchedulerPostTaskOptions, val: f64);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "TaskPriority")]
37    #[doc = "Get the `priority` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"]
40    #[doc = ""]
41    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "priority")]
44    pub fn get_priority(this: &SchedulerPostTaskOptions) -> Option<TaskPriority>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "TaskPriority")]
47    #[doc = "Change the `priority` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "priority")]
54    pub fn set_priority(this: &SchedulerPostTaskOptions, val: TaskPriority);
55    #[cfg(web_sys_unstable_apis)]
56    #[cfg(feature = "AbortSignal")]
57    #[doc = "Get the `signal` field of this object."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    #[wasm_bindgen(method, getter = "signal")]
64    pub fn get_signal(this: &SchedulerPostTaskOptions) -> Option<AbortSignal>;
65    #[cfg(web_sys_unstable_apis)]
66    #[cfg(feature = "AbortSignal")]
67    #[doc = "Change the `signal` field of this object."]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"]
70    #[doc = ""]
71    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
73    #[wasm_bindgen(method, setter = "signal")]
74    pub fn set_signal(this: &SchedulerPostTaskOptions, val: &AbortSignal);
75}
76#[cfg(web_sys_unstable_apis)]
77impl SchedulerPostTaskOptions {
78    #[doc = "Construct a new `SchedulerPostTaskOptions`."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
81    #[doc = ""]
82    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84    pub fn new() -> Self {
85        #[allow(unused_mut)]
86        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
87        ret
88    }
89    #[cfg(web_sys_unstable_apis)]
90    #[deprecated = "Use `set_delay()` instead."]
91    pub fn delay(&mut self, val: f64) -> &mut Self {
92        self.set_delay(val);
93        self
94    }
95    #[cfg(web_sys_unstable_apis)]
96    #[cfg(feature = "TaskPriority")]
97    #[deprecated = "Use `set_priority()` instead."]
98    pub fn priority(&mut self, val: TaskPriority) -> &mut Self {
99        self.set_priority(val);
100        self
101    }
102    #[cfg(web_sys_unstable_apis)]
103    #[cfg(feature = "AbortSignal")]
104    #[deprecated = "Use `set_signal()` instead."]
105    pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
106        self.set_signal(val);
107        self
108    }
109}
110#[cfg(web_sys_unstable_apis)]
111impl Default for SchedulerPostTaskOptions {
112    fn default() -> Self {
113        Self::new()
114    }
115}