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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "colorFormats")]
43 pub fn get_color_formats(
44 this: &GpuRenderPassLayout,
45 ) -> ::js_sys::Array<::js_sys::JsOption<::js_sys::JsString>>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `colorFormats` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "colorFormats")]
54 pub fn set_color_formats(
55 this: &GpuRenderPassLayout,
56 val: &[::js_sys::JsOption<::js_sys::JsString>],
57 );
58 #[cfg(web_sys_unstable_apis)]
59 #[cfg(feature = "GpuTextureFormat")]
60 #[doc = "Get the `depthStencilFormat` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"]
63 #[doc = ""]
64 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66 #[wasm_bindgen(method, getter = "depthStencilFormat")]
67 pub fn get_depth_stencil_format(this: &GpuRenderPassLayout) -> Option<GpuTextureFormat>;
68 #[cfg(web_sys_unstable_apis)]
69 #[cfg(feature = "GpuTextureFormat")]
70 #[doc = "Change the `depthStencilFormat` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"]
73 #[doc = ""]
74 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
76 #[wasm_bindgen(method, setter = "depthStencilFormat")]
77 pub fn set_depth_stencil_format(this: &GpuRenderPassLayout, val: GpuTextureFormat);
78 #[cfg(web_sys_unstable_apis)]
79 #[doc = "Get the `sampleCount` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 #[wasm_bindgen(method, getter = "sampleCount")]
86 pub fn get_sample_count(this: &GpuRenderPassLayout) -> Option<u32>;
87 #[cfg(web_sys_unstable_apis)]
88 #[doc = "Change the `sampleCount` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
91 #[doc = ""]
92 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
94 #[wasm_bindgen(method, setter = "sampleCount")]
95 pub fn set_sample_count(this: &GpuRenderPassLayout, val: u32);
96}
97#[cfg(web_sys_unstable_apis)]
98impl GpuRenderPassLayout {
99 #[doc = "Construct a new `GpuRenderPassLayout`."]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"]
102 #[doc = ""]
103 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
105 pub fn new(color_formats: &[::js_sys::JsOption<::js_sys::JsString>]) -> Self {
106 #[allow(unused_mut)]
107 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
108 ret.set_color_formats(color_formats);
109 ret
110 }
111 #[cfg(web_sys_unstable_apis)]
112 #[deprecated = "Use `set_label()` instead."]
113 pub fn label(&mut self, val: &str) -> &mut Self {
114 self.set_label(val);
115 self
116 }
117 #[cfg(web_sys_unstable_apis)]
118 #[deprecated = "Use `set_color_formats()` instead."]
119 pub fn color_formats(&mut self, val: &[::js_sys::JsOption<::js_sys::JsString>]) -> &mut Self {
120 self.set_color_formats(val);
121 self
122 }
123 #[cfg(web_sys_unstable_apis)]
124 #[cfg(feature = "GpuTextureFormat")]
125 #[deprecated = "Use `set_depth_stencil_format()` instead."]
126 pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self {
127 self.set_depth_stencil_format(val);
128 self
129 }
130 #[cfg(web_sys_unstable_apis)]
131 #[deprecated = "Use `set_sample_count()` instead."]
132 pub fn sample_count(&mut self, val: u32) -> &mut Self {
133 self.set_sample_count(val);
134 self
135 }
136}