web_sys/features/
gen_SchedulerPostTaskOptions.rs1#![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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "delay")]
34 pub fn set_delay(this: &SchedulerPostTaskOptions, val: u32);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Change the `delay` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, setter = "delay")]
43 pub fn set_delay_f64(this: &SchedulerPostTaskOptions, val: f64);
44 #[cfg(web_sys_unstable_apis)]
45 #[cfg(feature = "TaskPriority")]
46 #[doc = "Get the `priority` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 #[wasm_bindgen(method, getter = "priority")]
53 pub fn get_priority(this: &SchedulerPostTaskOptions) -> Option<TaskPriority>;
54 #[cfg(web_sys_unstable_apis)]
55 #[cfg(feature = "TaskPriority")]
56 #[doc = "Change the `priority` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, setter = "priority")]
63 pub fn set_priority(this: &SchedulerPostTaskOptions, val: TaskPriority);
64 #[cfg(web_sys_unstable_apis)]
65 #[cfg(feature = "AbortSignal")]
66 #[doc = "Get the `signal` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 #[wasm_bindgen(method, getter = "signal")]
73 pub fn get_signal(this: &SchedulerPostTaskOptions) -> Option<AbortSignal>;
74 #[cfg(web_sys_unstable_apis)]
75 #[cfg(feature = "AbortSignal")]
76 #[doc = "Change the `signal` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"]
79 #[doc = ""]
80 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82 #[wasm_bindgen(method, setter = "signal")]
83 pub fn set_signal(this: &SchedulerPostTaskOptions, val: &AbortSignal);
84}
85#[cfg(web_sys_unstable_apis)]
86impl SchedulerPostTaskOptions {
87 #[doc = "Construct a new `SchedulerPostTaskOptions`."]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"]
90 #[doc = ""]
91 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
92 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
93 pub fn new() -> Self {
94 #[allow(unused_mut)]
95 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
96 ret
97 }
98 #[cfg(web_sys_unstable_apis)]
99 #[deprecated = "Use `set_delay()` instead."]
100 pub fn delay(&mut self, val: u32) -> &mut Self {
101 self.set_delay(val);
102 self
103 }
104 #[cfg(web_sys_unstable_apis)]
105 #[cfg(feature = "TaskPriority")]
106 #[deprecated = "Use `set_priority()` instead."]
107 pub fn priority(&mut self, val: TaskPriority) -> &mut Self {
108 self.set_priority(val);
109 self
110 }
111 #[cfg(web_sys_unstable_apis)]
112 #[cfg(feature = "AbortSignal")]
113 #[deprecated = "Use `set_signal()` instead."]
114 pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
115 self.set_signal(val);
116 self
117 }
118}
119#[cfg(web_sys_unstable_apis)]
120impl Default for SchedulerPostTaskOptions {
121 fn default() -> Self {
122 Self::new()
123 }
124}