Skip to main content

web_sys/features/
gen_Performance.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 = Performance , typescript_type = "Performance")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `Performance` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
14    pub type Performance;
15    # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = timeOrigin)]
16    #[doc = "Getter for the `timeOrigin` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timeOrigin)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
21    pub fn time_origin(this: &Performance) -> f64;
22    #[cfg(feature = "PerformanceTiming")]
23    # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = timing)]
24    #[doc = "Getter for the `timing` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/timing)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceTiming`*"]
29    pub fn timing(this: &Performance) -> PerformanceTiming;
30    #[cfg(feature = "PerformanceNavigation")]
31    # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = navigation)]
32    #[doc = "Getter for the `navigation` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/navigation)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceNavigation`*"]
37    pub fn navigation(this: &Performance) -> PerformanceNavigation;
38    # [wasm_bindgen (structural , method , getter , js_class = "Performance" , js_name = onresourcetimingbufferfull)]
39    #[doc = "Getter for the `onresourcetimingbufferfull` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/onresourcetimingbufferfull)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
44    pub fn onresourcetimingbufferfull(this: &Performance) -> Option<::js_sys::Function>;
45    # [wasm_bindgen (structural , method , setter , js_class = "Performance" , js_name = onresourcetimingbufferfull)]
46    #[doc = "Setter for the `onresourcetimingbufferfull` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/onresourcetimingbufferfull)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
51    pub fn set_onresourcetimingbufferfull(this: &Performance, value: Option<&::js_sys::Function>);
52    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMarks)]
53    #[doc = "The `clearMarks()` method."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
58    pub fn clear_marks(this: &Performance);
59    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMarks)]
60    #[doc = "The `clearMarks()` method."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMarks)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
65    pub fn clear_marks_with_mark_name(this: &Performance, mark_name: &str);
66    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMeasures)]
67    #[doc = "The `clearMeasures()` method."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
72    pub fn clear_measures(this: &Performance);
73    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearMeasures)]
74    #[doc = "The `clearMeasures()` method."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearMeasures)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
79    pub fn clear_measures_with_measure_name(this: &Performance, measure_name: &str);
80    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = clearResourceTimings)]
81    #[doc = "The `clearResourceTimings()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/clearResourceTimings)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
86    pub fn clear_resource_timings(this: &Performance);
87    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntries)]
88    #[doc = "The `getEntries()` method."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntries)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
93    pub fn get_entries(this: &Performance) -> ::js_sys::Array;
94    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByName)]
95    #[doc = "The `getEntriesByName()` method."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
100    pub fn get_entries_by_name(this: &Performance, name: &str) -> ::js_sys::Array;
101    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByName)]
102    #[doc = "The `getEntriesByName()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
107    pub fn get_entries_by_name_with_entry_type(
108        this: &Performance,
109        name: &str,
110        entry_type: &str,
111    ) -> ::js_sys::Array;
112    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = getEntriesByType)]
113    #[doc = "The `getEntriesByType()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
118    pub fn get_entries_by_type(this: &Performance, entry_type: &str) -> ::js_sys::Array;
119    #[cfg(not(web_sys_unstable_apis))]
120    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = mark)]
121    #[doc = "The `mark()` method."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
126    pub fn mark(this: &Performance, mark_name: &str) -> Result<(), JsValue>;
127    #[cfg(web_sys_unstable_apis)]
128    #[cfg(feature = "PerformanceMark")]
129    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = mark)]
130    #[doc = "The `mark()` method."]
131    #[doc = ""]
132    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)"]
133    #[doc = ""]
134    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMark`*"]
135    #[doc = ""]
136    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
137    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
138    pub fn mark(this: &Performance, mark_name: &str) -> Result<PerformanceMark, JsValue>;
139    #[cfg(web_sys_unstable_apis)]
140    #[cfg(all(feature = "PerformanceMark", feature = "PerformanceMarkOptions",))]
141    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = mark)]
142    #[doc = "The `mark()` method."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMark`, `PerformanceMarkOptions`*"]
147    #[doc = ""]
148    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
149    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
150    pub fn mark_with_mark_options(
151        this: &Performance,
152        mark_name: &str,
153        mark_options: &PerformanceMarkOptions,
154    ) -> Result<PerformanceMark, JsValue>;
155    #[cfg(not(web_sys_unstable_apis))]
156    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
157    #[doc = "The `measure()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
162    pub fn measure(this: &Performance, measure_name: &str) -> Result<(), JsValue>;
163    #[cfg(not(web_sys_unstable_apis))]
164    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
165    #[doc = "The `measure()` method."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
170    pub fn measure_with_start_mark(
171        this: &Performance,
172        measure_name: &str,
173        start_mark: &str,
174    ) -> Result<(), JsValue>;
175    #[cfg(not(web_sys_unstable_apis))]
176    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
177    #[doc = "The `measure()` method."]
178    #[doc = ""]
179    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
180    #[doc = ""]
181    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
182    pub fn measure_with_start_mark_and_end_mark(
183        this: &Performance,
184        measure_name: &str,
185        start_mark: &str,
186        end_mark: &str,
187    ) -> Result<(), JsValue>;
188    #[cfg(web_sys_unstable_apis)]
189    #[cfg(feature = "PerformanceMeasure")]
190    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
191    #[doc = "The `measure()` method."]
192    #[doc = ""]
193    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
194    #[doc = ""]
195    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMeasure`*"]
196    #[doc = ""]
197    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
198    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
199    pub fn measure(this: &Performance, measure_name: &str) -> Result<PerformanceMeasure, JsValue>;
200    #[cfg(web_sys_unstable_apis)]
201    #[cfg(feature = "PerformanceMeasure")]
202    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
203    #[doc = "The `measure()` method."]
204    #[doc = ""]
205    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
206    #[doc = ""]
207    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMeasure`*"]
208    #[doc = ""]
209    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
211    pub fn measure_with_str(
212        this: &Performance,
213        measure_name: &str,
214        start_or_measure_options: &str,
215    ) -> Result<PerformanceMeasure, JsValue>;
216    #[cfg(web_sys_unstable_apis)]
217    #[cfg(feature = "PerformanceMeasure")]
218    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
219    #[doc = "The `measure()` method."]
220    #[doc = ""]
221    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
222    #[doc = ""]
223    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMeasure`*"]
224    #[doc = ""]
225    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
226    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
227    pub fn measure_with_str_and_end_mark(
228        this: &Performance,
229        measure_name: &str,
230        start_or_measure_options: &str,
231        end_mark: &str,
232    ) -> Result<PerformanceMeasure, JsValue>;
233    #[cfg(web_sys_unstable_apis)]
234    #[cfg(all(feature = "PerformanceMeasure", feature = "PerformanceMeasureOptions",))]
235    # [wasm_bindgen (catch , method , structural , js_class = "Performance" , js_name = measure)]
236    #[doc = "The `measure()` method."]
237    #[doc = ""]
238    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure)"]
239    #[doc = ""]
240    #[doc = "*This API requires the following crate features to be activated: `Performance`, `PerformanceMeasure`, `PerformanceMeasureOptions`*"]
241    #[doc = ""]
242    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
243    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
244    pub fn measure_with_performance_measure_options(
245        this: &Performance,
246        measure_name: &str,
247        start_or_measure_options: &PerformanceMeasureOptions,
248    ) -> Result<PerformanceMeasure, JsValue>;
249    #[cfg(web_sys_unstable_apis)]
250    #[cfg(feature = "MemoryMeasurement")]
251    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = measureUserAgentSpecificMemory)]
252    #[doc = "The `measureUserAgentSpecificMemory()` method."]
253    #[doc = ""]
254    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measureUserAgentSpecificMemory)"]
255    #[doc = ""]
256    #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`, `Performance`*"]
257    #[doc = ""]
258    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
259    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
260    pub fn measure_user_agent_specific_memory(
261        this: &Performance,
262    ) -> ::js_sys::Promise<MemoryMeasurement>;
263    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = now)]
264    #[doc = "The `now()` method."]
265    #[doc = ""]
266    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)"]
267    #[doc = ""]
268    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
269    pub fn now(this: &Performance) -> f64;
270    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = setResourceTimingBufferSize)]
271    #[doc = "The `setResourceTimingBufferSize()` method."]
272    #[doc = ""]
273    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/setResourceTimingBufferSize)"]
274    #[doc = ""]
275    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
276    pub fn set_resource_timing_buffer_size(this: &Performance, max_size: u32);
277    # [wasm_bindgen (method , structural , js_class = "Performance" , js_name = toJSON)]
278    #[doc = "The `toJSON()` method."]
279    #[doc = ""]
280    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON)"]
281    #[doc = ""]
282    #[doc = "*This API requires the following crate features to be activated: `Performance`*"]
283    pub fn to_json(this: &Performance) -> ::js_sys::Object;
284}