Skip to main content

web_sys/features/
gen_PerformanceMark.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(
9        extends = "PerformanceEntry",
10        extends = "::js_sys::Object",
11        js_name = "PerformanceMark",
12        typescript_type = "PerformanceMark"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `PerformanceMark` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `PerformanceMark`*"]
20    #[doc = ""]
21    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23    pub type PerformanceMark;
24    #[cfg(web_sys_unstable_apis)]
25    #[wasm_bindgen(method, getter, js_class = "PerformanceMark", js_name = "detail")]
26    #[doc = "Getter for the `detail` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark/detail)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `PerformanceMark`*"]
31    #[doc = ""]
32    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34    pub fn detail(this: &PerformanceMark) -> ::wasm_bindgen::JsValue;
35    #[cfg(web_sys_unstable_apis)]
36    #[wasm_bindgen(catch, constructor, js_class = "PerformanceMark")]
37    #[doc = "The `new PerformanceMark(..)` constructor, creating a new instance of `PerformanceMark`."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark/PerformanceMark)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `PerformanceMark`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    pub fn new(mark_name: &str) -> Result<PerformanceMark, JsValue>;
46    #[cfg(web_sys_unstable_apis)]
47    #[cfg(feature = "PerformanceMarkOptions")]
48    #[wasm_bindgen(catch, constructor, js_class = "PerformanceMark")]
49    #[doc = "The `new PerformanceMark(..)` constructor, creating a new instance of `PerformanceMark`."]
50    #[doc = ""]
51    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceMark/PerformanceMark)"]
52    #[doc = ""]
53    #[doc = "*This API requires the following crate features to be activated: `PerformanceMark`, `PerformanceMarkOptions`*"]
54    #[doc = ""]
55    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57    pub fn new_with_mark_options(
58        mark_name: &str,
59        mark_options: &PerformanceMarkOptions,
60    ) -> Result<PerformanceMark, JsValue>;
61}