web_sys/features/
gen_GpuRenderPassLayout.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 = GPURenderPassLayout)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuRenderPassLayout` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
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 GpuRenderPassLayout;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `label` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
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 = "label")]
25 pub fn get_label(this: &GpuRenderPassLayout) -> Option<::alloc::string::String>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `label` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
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 = "label")]
34 pub fn set_label(this: &GpuRenderPassLayout, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `colorFormats` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
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 = "colorFormats")]
43 pub fn get_color_formats(this: &GpuRenderPassLayout) -> ::js_sys::Array;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `colorFormats` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
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 = "colorFormats")]
52 pub fn set_color_formats(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuTextureFormat")]
55 #[doc = "Get the `depthStencilFormat` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"]
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 = "depthStencilFormat")]
62 pub fn get_depth_stencil_format(this: &GpuRenderPassLayout) -> Option<GpuTextureFormat>;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuTextureFormat")]
65 #[doc = "Change the `depthStencilFormat` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"]
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 = "depthStencilFormat")]
72 pub fn set_depth_stencil_format(this: &GpuRenderPassLayout, val: GpuTextureFormat);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `sampleCount` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "sampleCount")]
81 pub fn get_sample_count(this: &GpuRenderPassLayout) -> Option<u32>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `sampleCount` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "sampleCount")]
90 pub fn set_sample_count(this: &GpuRenderPassLayout, val: u32);
91}
92#[cfg(web_sys_unstable_apis)]
93impl GpuRenderPassLayout {
94 #[doc = "Construct a new `GpuRenderPassLayout`."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
97 #[doc = ""]
98 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self {
101 #[allow(unused_mut)]
102 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
103 ret.set_color_formats(color_formats);
104 ret
105 }
106 #[cfg(web_sys_unstable_apis)]
107 #[deprecated = "Use `set_label()` instead."]
108 pub fn label(&mut self, val: &str) -> &mut Self {
109 self.set_label(val);
110 self
111 }
112 #[cfg(web_sys_unstable_apis)]
113 #[deprecated = "Use `set_color_formats()` instead."]
114 pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
115 self.set_color_formats(val);
116 self
117 }
118 #[cfg(web_sys_unstable_apis)]
119 #[cfg(feature = "GpuTextureFormat")]
120 #[deprecated = "Use `set_depth_stencil_format()` instead."]
121 pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self {
122 self.set_depth_stencil_format(val);
123 self
124 }
125 #[cfg(web_sys_unstable_apis)]
126 #[deprecated = "Use `set_sample_count()` instead."]
127 pub fn sample_count(&mut self, val: u32) -> &mut Self {
128 self.set_sample_count(val);
129 self
130 }
131}