1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [ wasm_bindgen ( extends = :: js_sys :: Object , js_name = GPUQuerySetDescriptor ) ]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuQuerySetDescriptor` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type GpuQuerySetDescriptor;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl GpuQuerySetDescriptor {
19     #[cfg(feature = "GpuQueryType")]
20     #[doc = "Construct a new `GpuQuerySetDescriptor`."]
21     #[doc = ""]
22     #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"]
23     #[doc = ""]
24     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
25     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
26     pub fn new(count: u32, type_: GpuQueryType) -> Self {
27         #[allow(unused_mut)]
28         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
29         ret.count(count);
30         ret.type_(type_);
31         ret
32     }
33     #[cfg(web_sys_unstable_apis)]
34     #[doc = "Change the `label` field of this object."]
35     #[doc = ""]
36     #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
37     #[doc = ""]
38     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
39     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
40     pub fn label(&mut self, val: &str) -> &mut Self {
41         use wasm_bindgen::JsValue;
42         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("label"), &JsValue::from(val));
43         debug_assert!(
44             r.is_ok(),
45             "setting properties should never fail on our dictionary objects"
46         );
47         let _ = r;
48         self
49     }
50     #[cfg(web_sys_unstable_apis)]
51     #[doc = "Change the `count` field of this object."]
52     #[doc = ""]
53     #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
57     pub fn count(&mut self, val: u32) -> &mut Self {
58         use wasm_bindgen::JsValue;
59         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("count"), &JsValue::from(val));
pg_jit_available(PG_FUNCTION_ARGS)60         debug_assert!(
61             r.is_ok(),
62             "setting properties should never fail on our dictionary objects"
63         );
64         let _ = r;
65         self
66     }
67     #[cfg(web_sys_unstable_apis)]
68     #[cfg(feature = "GpuQueryType")]
69     #[doc = "Change the `type` field of this object."]
70     #[doc = ""]
provider_init(void)71     #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"]
72     #[doc = ""]
73     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75     pub fn type_(&mut self, val: GpuQueryType) -> &mut Self {
76         use wasm_bindgen::JsValue;
77         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
78         debug_assert!(
79             r.is_ok(),
80             "setting properties should never fail on our dictionary objects"
81         );
82         let _ = r;
83         self
84     }
85 }
86