Skip to main content

web_sys/features/
gen_ProfileTimelineMarker.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ProfileTimelineMarker)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ProfileTimelineMarker` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
12    pub type ProfileTimelineMarker;
13    #[doc = "Get the `causeName` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
16    #[wasm_bindgen(method, getter = "causeName")]
17    pub fn get_cause_name(this: &ProfileTimelineMarker) -> Option<::alloc::string::String>;
18    #[doc = "Change the `causeName` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
21    #[wasm_bindgen(method, setter = "causeName")]
22    pub fn set_cause_name(this: &ProfileTimelineMarker, val: &str);
23    #[doc = "Get the `end` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
26    #[wasm_bindgen(method, getter = "end")]
27    pub fn get_end(this: &ProfileTimelineMarker) -> Option<f64>;
28    #[doc = "Change the `end` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
31    #[wasm_bindgen(method, setter = "end")]
32    pub fn set_end(this: &ProfileTimelineMarker, val: f64);
33    #[doc = "Get the `endStack` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
36    #[wasm_bindgen(method, getter = "endStack")]
37    pub fn get_end_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>;
38    #[doc = "Change the `endStack` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
41    #[wasm_bindgen(method, setter = "endStack")]
42    pub fn set_end_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>);
43    #[doc = "Get the `eventPhase` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
46    #[wasm_bindgen(method, getter = "eventPhase")]
47    pub fn get_event_phase(this: &ProfileTimelineMarker) -> Option<u16>;
48    #[doc = "Change the `eventPhase` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
51    #[wasm_bindgen(method, setter = "eventPhase")]
52    pub fn set_event_phase(this: &ProfileTimelineMarker, val: u16);
53    #[doc = "Get the `isAnimationOnly` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
56    #[wasm_bindgen(method, getter = "isAnimationOnly")]
57    pub fn get_is_animation_only(this: &ProfileTimelineMarker) -> Option<bool>;
58    #[doc = "Change the `isAnimationOnly` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
61    #[wasm_bindgen(method, setter = "isAnimationOnly")]
62    pub fn set_is_animation_only(this: &ProfileTimelineMarker, val: bool);
63    #[doc = "Get the `isOffMainThread` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
66    #[wasm_bindgen(method, getter = "isOffMainThread")]
67    pub fn get_is_off_main_thread(this: &ProfileTimelineMarker) -> Option<bool>;
68    #[doc = "Change the `isOffMainThread` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
71    #[wasm_bindgen(method, setter = "isOffMainThread")]
72    pub fn set_is_off_main_thread(this: &ProfileTimelineMarker, val: bool);
73    #[cfg(feature = "ProfileTimelineMessagePortOperationType")]
74    #[doc = "Get the `messagePortOperation` field of this object."]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"]
77    #[wasm_bindgen(method, getter = "messagePortOperation")]
78    pub fn get_message_port_operation(
79        this: &ProfileTimelineMarker,
80    ) -> Option<ProfileTimelineMessagePortOperationType>;
81    #[cfg(feature = "ProfileTimelineMessagePortOperationType")]
82    #[doc = "Change the `messagePortOperation` field of this object."]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"]
85    #[wasm_bindgen(method, setter = "messagePortOperation")]
86    pub fn set_message_port_operation(
87        this: &ProfileTimelineMarker,
88        val: ProfileTimelineMessagePortOperationType,
89    );
90    #[doc = "Get the `name` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
93    #[wasm_bindgen(method, getter = "name")]
94    pub fn get_name(this: &ProfileTimelineMarker) -> Option<::alloc::string::String>;
95    #[doc = "Change the `name` field of this object."]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
98    #[wasm_bindgen(method, setter = "name")]
99    pub fn set_name(this: &ProfileTimelineMarker, val: &str);
100    #[doc = "Get the `processType` field of this object."]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
103    #[wasm_bindgen(method, getter = "processType")]
104    pub fn get_process_type(this: &ProfileTimelineMarker) -> Option<u16>;
105    #[doc = "Change the `processType` field of this object."]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
108    #[wasm_bindgen(method, setter = "processType")]
109    pub fn set_process_type(this: &ProfileTimelineMarker, val: u16);
110    #[doc = "Get the `rectangles` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
113    #[wasm_bindgen(method, getter = "rectangles")]
114    pub fn get_rectangles(this: &ProfileTimelineMarker) -> Option<::js_sys::Array>;
115    #[doc = "Change the `rectangles` field of this object."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
118    #[wasm_bindgen(method, setter = "rectangles")]
119    pub fn set_rectangles(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue);
120    #[doc = "Get the `stack` field of this object."]
121    #[doc = ""]
122    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
123    #[wasm_bindgen(method, getter = "stack")]
124    pub fn get_stack(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>;
125    #[doc = "Change the `stack` field of this object."]
126    #[doc = ""]
127    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
128    #[wasm_bindgen(method, setter = "stack")]
129    pub fn set_stack(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>);
130    #[doc = "Get the `start` field of this object."]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
133    #[wasm_bindgen(method, getter = "start")]
134    pub fn get_start(this: &ProfileTimelineMarker) -> Option<f64>;
135    #[doc = "Change the `start` field of this object."]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
138    #[wasm_bindgen(method, setter = "start")]
139    pub fn set_start(this: &ProfileTimelineMarker, val: f64);
140    #[doc = "Get the `type` field of this object."]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
143    #[wasm_bindgen(method, getter = "type")]
144    pub fn get_type(this: &ProfileTimelineMarker) -> Option<::alloc::string::String>;
145    #[doc = "Change the `type` field of this object."]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
148    #[wasm_bindgen(method, setter = "type")]
149    pub fn set_type(this: &ProfileTimelineMarker, val: &str);
150    #[doc = "Get the `unixTime` field of this object."]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
153    #[wasm_bindgen(method, getter = "unixTime")]
154    pub fn get_unix_time(this: &ProfileTimelineMarker) -> Option<f64>;
155    #[doc = "Change the `unixTime` field of this object."]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
158    #[wasm_bindgen(method, setter = "unixTime")]
159    pub fn set_unix_time(this: &ProfileTimelineMarker, val: f64);
160    #[doc = "Change the `unixTime` field of this object."]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
163    #[wasm_bindgen(method, setter = "unixTime")]
164    pub fn set_unix_time_u32(this: &ProfileTimelineMarker, val: u32);
165    #[doc = "Change the `unixTime` field of this object."]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
168    #[wasm_bindgen(method, setter = "unixTime")]
169    pub fn set_unix_time_f64(this: &ProfileTimelineMarker, val: f64);
170    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
171    #[doc = "Get the `workerOperation` field of this object."]
172    #[doc = ""]
173    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"]
174    #[wasm_bindgen(method, getter = "workerOperation")]
175    pub fn get_worker_operation(
176        this: &ProfileTimelineMarker,
177    ) -> Option<ProfileTimelineWorkerOperationType>;
178    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
179    #[doc = "Change the `workerOperation` field of this object."]
180    #[doc = ""]
181    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"]
182    #[wasm_bindgen(method, setter = "workerOperation")]
183    pub fn set_worker_operation(
184        this: &ProfileTimelineMarker,
185        val: ProfileTimelineWorkerOperationType,
186    );
187}
188impl ProfileTimelineMarker {
189    #[doc = "Construct a new `ProfileTimelineMarker`."]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
192    pub fn new() -> Self {
193        #[allow(unused_mut)]
194        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
195        ret
196    }
197    #[deprecated = "Use `set_cause_name()` instead."]
198    pub fn cause_name(&mut self, val: &str) -> &mut Self {
199        self.set_cause_name(val);
200        self
201    }
202    #[deprecated = "Use `set_end()` instead."]
203    pub fn end(&mut self, val: f64) -> &mut Self {
204        self.set_end(val);
205        self
206    }
207    #[deprecated = "Use `set_end_stack()` instead."]
208    pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
209        self.set_end_stack(val);
210        self
211    }
212    #[deprecated = "Use `set_event_phase()` instead."]
213    pub fn event_phase(&mut self, val: u16) -> &mut Self {
214        self.set_event_phase(val);
215        self
216    }
217    #[deprecated = "Use `set_is_animation_only()` instead."]
218    pub fn is_animation_only(&mut self, val: bool) -> &mut Self {
219        self.set_is_animation_only(val);
220        self
221    }
222    #[deprecated = "Use `set_is_off_main_thread()` instead."]
223    pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self {
224        self.set_is_off_main_thread(val);
225        self
226    }
227    #[cfg(feature = "ProfileTimelineMessagePortOperationType")]
228    #[deprecated = "Use `set_message_port_operation()` instead."]
229    pub fn message_port_operation(
230        &mut self,
231        val: ProfileTimelineMessagePortOperationType,
232    ) -> &mut Self {
233        self.set_message_port_operation(val);
234        self
235    }
236    #[deprecated = "Use `set_name()` instead."]
237    pub fn name(&mut self, val: &str) -> &mut Self {
238        self.set_name(val);
239        self
240    }
241    #[deprecated = "Use `set_process_type()` instead."]
242    pub fn process_type(&mut self, val: u16) -> &mut Self {
243        self.set_process_type(val);
244        self
245    }
246    #[deprecated = "Use `set_rectangles()` instead."]
247    pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
248        self.set_rectangles(val);
249        self
250    }
251    #[deprecated = "Use `set_stack()` instead."]
252    pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
253        self.set_stack(val);
254        self
255    }
256    #[deprecated = "Use `set_start()` instead."]
257    pub fn start(&mut self, val: f64) -> &mut Self {
258        self.set_start(val);
259        self
260    }
261    #[deprecated = "Use `set_type()` instead."]
262    pub fn type_(&mut self, val: &str) -> &mut Self {
263        self.set_type(val);
264        self
265    }
266    #[deprecated = "Use `set_unix_time()` instead."]
267    pub fn unix_time(&mut self, val: f64) -> &mut Self {
268        self.set_unix_time(val);
269        self
270    }
271    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
272    #[deprecated = "Use `set_worker_operation()` instead."]
273    pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self {
274        self.set_worker_operation(val);
275        self
276    }
277}
278impl Default for ProfileTimelineMarker {
279    fn default() -> Self {
280        Self::new()
281    }
282}