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    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
161    #[doc = "Get the `workerOperation` field of this object."]
162    #[doc = ""]
163    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"]
164    #[wasm_bindgen(method, getter = "workerOperation")]
165    pub fn get_worker_operation(
166        this: &ProfileTimelineMarker,
167    ) -> Option<ProfileTimelineWorkerOperationType>;
168    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
169    #[doc = "Change the `workerOperation` field of this object."]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"]
172    #[wasm_bindgen(method, setter = "workerOperation")]
173    pub fn set_worker_operation(
174        this: &ProfileTimelineMarker,
175        val: ProfileTimelineWorkerOperationType,
176    );
177}
178impl ProfileTimelineMarker {
179    #[doc = "Construct a new `ProfileTimelineMarker`."]
180    #[doc = ""]
181    #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"]
182    pub fn new() -> Self {
183        #[allow(unused_mut)]
184        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
185        ret
186    }
187    #[deprecated = "Use `set_cause_name()` instead."]
188    pub fn cause_name(&mut self, val: &str) -> &mut Self {
189        self.set_cause_name(val);
190        self
191    }
192    #[deprecated = "Use `set_end()` instead."]
193    pub fn end(&mut self, val: f64) -> &mut Self {
194        self.set_end(val);
195        self
196    }
197    #[deprecated = "Use `set_end_stack()` instead."]
198    pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
199        self.set_end_stack(val);
200        self
201    }
202    #[deprecated = "Use `set_event_phase()` instead."]
203    pub fn event_phase(&mut self, val: u16) -> &mut Self {
204        self.set_event_phase(val);
205        self
206    }
207    #[deprecated = "Use `set_is_animation_only()` instead."]
208    pub fn is_animation_only(&mut self, val: bool) -> &mut Self {
209        self.set_is_animation_only(val);
210        self
211    }
212    #[deprecated = "Use `set_is_off_main_thread()` instead."]
213    pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self {
214        self.set_is_off_main_thread(val);
215        self
216    }
217    #[cfg(feature = "ProfileTimelineMessagePortOperationType")]
218    #[deprecated = "Use `set_message_port_operation()` instead."]
219    pub fn message_port_operation(
220        &mut self,
221        val: ProfileTimelineMessagePortOperationType,
222    ) -> &mut Self {
223        self.set_message_port_operation(val);
224        self
225    }
226    #[deprecated = "Use `set_name()` instead."]
227    pub fn name(&mut self, val: &str) -> &mut Self {
228        self.set_name(val);
229        self
230    }
231    #[deprecated = "Use `set_process_type()` instead."]
232    pub fn process_type(&mut self, val: u16) -> &mut Self {
233        self.set_process_type(val);
234        self
235    }
236    #[deprecated = "Use `set_rectangles()` instead."]
237    pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
238        self.set_rectangles(val);
239        self
240    }
241    #[deprecated = "Use `set_stack()` instead."]
242    pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self {
243        self.set_stack(val);
244        self
245    }
246    #[deprecated = "Use `set_start()` instead."]
247    pub fn start(&mut self, val: f64) -> &mut Self {
248        self.set_start(val);
249        self
250    }
251    #[deprecated = "Use `set_type()` instead."]
252    pub fn type_(&mut self, val: &str) -> &mut Self {
253        self.set_type(val);
254        self
255    }
256    #[deprecated = "Use `set_unix_time()` instead."]
257    pub fn unix_time(&mut self, val: f64) -> &mut Self {
258        self.set_unix_time(val);
259        self
260    }
261    #[cfg(feature = "ProfileTimelineWorkerOperationType")]
262    #[deprecated = "Use `set_worker_operation()` instead."]
263    pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self {
264        self.set_worker_operation(val);
265        self
266    }
267}
268impl Default for ProfileTimelineMarker {
269    fn default() -> Self {
270        Self::new()
271    }
272}