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