web_sys/features/
gen_GpuComputePassTimestampWrites.rs1#![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 (extends = :: js_sys :: Object , js_name = GPUComputePassTimestampWrites)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuComputePassTimestampWrites` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type GpuComputePassTimestampWrites;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `beginningOfPassWriteIndex` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")]
25 pub fn get_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option<u32>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `beginningOfPassWriteIndex` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"]
30 #[doc = ""]
31 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")]
34 pub fn set_beginning_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `endOfPassWriteIndex` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "endOfPassWriteIndex")]
43 pub fn get_end_of_pass_write_index(this: &GpuComputePassTimestampWrites) -> Option<u32>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `endOfPassWriteIndex` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "endOfPassWriteIndex")]
52 pub fn set_end_of_pass_write_index(this: &GpuComputePassTimestampWrites, val: u32);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuQuerySet")]
55 #[doc = "Get the `querySet` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"]
58 #[doc = ""]
59 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61 #[wasm_bindgen(method, getter = "querySet")]
62 pub fn get_query_set(this: &GpuComputePassTimestampWrites) -> GpuQuerySet;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuQuerySet")]
65 #[doc = "Change the `querySet` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "querySet")]
72 pub fn set_query_set(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet);
73}
74#[cfg(web_sys_unstable_apis)]
75impl GpuComputePassTimestampWrites {
76 #[cfg(feature = "GpuQuerySet")]
77 #[doc = "Construct a new `GpuComputePassTimestampWrites`."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"]
80 #[doc = ""]
81 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
83 pub fn new(query_set: &GpuQuerySet) -> Self {
84 #[allow(unused_mut)]
85 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
86 ret.set_query_set(query_set);
87 ret
88 }
89 #[cfg(web_sys_unstable_apis)]
90 #[deprecated = "Use `set_beginning_of_pass_write_index()` instead."]
91 pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self {
92 self.set_beginning_of_pass_write_index(val);
93 self
94 }
95 #[cfg(web_sys_unstable_apis)]
96 #[deprecated = "Use `set_end_of_pass_write_index()` instead."]
97 pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self {
98 self.set_end_of_pass_write_index(val);
99 self
100 }
101 #[cfg(web_sys_unstable_apis)]
102 #[cfg(feature = "GpuQuerySet")]
103 #[deprecated = "Use `set_query_set()` instead."]
104 pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self {
105 self.set_query_set(val);
106 self
107 }
108}