web_sys/features/
gen_GpuRenderPipelineDescriptor.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 = GPURenderPipelineDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuRenderPipelineDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"]
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 GpuRenderPipelineDescriptor;
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: `GpuRenderPipelineDescriptor`*"]
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: &GpuRenderPipelineDescriptor) -> 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: `GpuRenderPipelineDescriptor`*"]
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: &GpuRenderPipelineDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `layout` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"]
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 = "layout")]
43 pub fn get_layout(this: &GpuRenderPipelineDescriptor) -> ::wasm_bindgen::JsValue;
44 #[cfg(web_sys_unstable_apis)]
45 #[cfg(feature = "GpuPipelineLayout")]
46 #[doc = "Change the `layout` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 #[wasm_bindgen(method, setter = "layout")]
53 pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &GpuPipelineLayout);
54 #[cfg(web_sys_unstable_apis)]
55 #[cfg(feature = "GpuAutoLayoutMode")]
56 #[doc = "Change the `layout` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, setter = "layout")]
63 pub fn set_layout_gpu_auto_layout_mode(
64 this: &GpuRenderPipelineDescriptor,
65 val: GpuAutoLayoutMode,
66 );
67 #[cfg(web_sys_unstable_apis)]
68 #[cfg(feature = "GpuDepthStencilState")]
69 #[doc = "Get the `depthStencil` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, getter = "depthStencil")]
76 pub fn get_depth_stencil(this: &GpuRenderPipelineDescriptor) -> Option<GpuDepthStencilState>;
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "GpuDepthStencilState")]
79 #[doc = "Change the `depthStencil` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"]
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, setter = "depthStencil")]
86 pub fn set_depth_stencil(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState);
87 #[cfg(web_sys_unstable_apis)]
88 #[cfg(feature = "GpuFragmentState")]
89 #[doc = "Get the `fragment` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 #[wasm_bindgen(method, getter = "fragment")]
96 pub fn get_fragment(this: &GpuRenderPipelineDescriptor) -> Option<GpuFragmentState>;
97 #[cfg(web_sys_unstable_apis)]
98 #[cfg(feature = "GpuFragmentState")]
99 #[doc = "Change the `fragment` field of this object."]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"]
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 #[wasm_bindgen(method, setter = "fragment")]
106 pub fn set_fragment(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState);
107 #[cfg(web_sys_unstable_apis)]
108 #[cfg(feature = "GpuMultisampleState")]
109 #[doc = "Get the `multisample` field of this object."]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"]
112 #[doc = ""]
113 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
114 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
115 #[wasm_bindgen(method, getter = "multisample")]
116 pub fn get_multisample(this: &GpuRenderPipelineDescriptor) -> Option<GpuMultisampleState>;
117 #[cfg(web_sys_unstable_apis)]
118 #[cfg(feature = "GpuMultisampleState")]
119 #[doc = "Change the `multisample` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"]
122 #[doc = ""]
123 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125 #[wasm_bindgen(method, setter = "multisample")]
126 pub fn set_multisample(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState);
127 #[cfg(web_sys_unstable_apis)]
128 #[cfg(feature = "GpuPrimitiveState")]
129 #[doc = "Get the `primitive` field of this object."]
130 #[doc = ""]
131 #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"]
132 #[doc = ""]
133 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
134 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
135 #[wasm_bindgen(method, getter = "primitive")]
136 pub fn get_primitive(this: &GpuRenderPipelineDescriptor) -> Option<GpuPrimitiveState>;
137 #[cfg(web_sys_unstable_apis)]
138 #[cfg(feature = "GpuPrimitiveState")]
139 #[doc = "Change the `primitive` field of this object."]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"]
142 #[doc = ""]
143 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
144 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 #[wasm_bindgen(method, setter = "primitive")]
146 pub fn set_primitive(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState);
147 #[cfg(web_sys_unstable_apis)]
148 #[cfg(feature = "GpuVertexState")]
149 #[doc = "Get the `vertex` field of this object."]
150 #[doc = ""]
151 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
152 #[doc = ""]
153 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
154 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
155 #[wasm_bindgen(method, getter = "vertex")]
156 pub fn get_vertex(this: &GpuRenderPipelineDescriptor) -> GpuVertexState;
157 #[cfg(web_sys_unstable_apis)]
158 #[cfg(feature = "GpuVertexState")]
159 #[doc = "Change the `vertex` field of this object."]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
162 #[doc = ""]
163 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
164 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
165 #[wasm_bindgen(method, setter = "vertex")]
166 pub fn set_vertex(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState);
167}
168#[cfg(web_sys_unstable_apis)]
169impl GpuRenderPipelineDescriptor {
170 #[cfg(all(feature = "GpuPipelineLayout", feature = "GpuVertexState",))]
171 #[doc = "Construct a new `GpuRenderPipelineDescriptor`."]
172 #[doc = ""]
173 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
174 #[doc = ""]
175 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
176 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
177 pub fn new(layout: &GpuPipelineLayout, vertex: &GpuVertexState) -> Self {
178 #[allow(unused_mut)]
179 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
180 ret.set_layout(layout);
181 ret.set_vertex(vertex);
182 ret
183 }
184 #[cfg(all(feature = "GpuAutoLayoutMode", feature = "GpuVertexState",))]
185 #[doc = "Construct a new `GpuRenderPipelineDescriptor`."]
186 #[doc = ""]
187 #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
188 #[doc = ""]
189 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
190 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
191 pub fn new_with_gpu_auto_layout_mode(
192 layout: GpuAutoLayoutMode,
193 vertex: &GpuVertexState,
194 ) -> Self {
195 #[allow(unused_mut)]
196 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
197 ret.set_layout_gpu_auto_layout_mode(layout);
198 ret.set_vertex(vertex);
199 ret
200 }
201 #[cfg(web_sys_unstable_apis)]
202 #[deprecated = "Use `set_label()` instead."]
203 pub fn label(&mut self, val: &str) -> &mut Self {
204 self.set_label(val);
205 self
206 }
207 #[cfg(web_sys_unstable_apis)]
208 #[deprecated = "Use `set_layout()` instead."]
209 pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self {
210 self.set_layout(val);
211 self
212 }
213 #[cfg(web_sys_unstable_apis)]
214 #[cfg(feature = "GpuDepthStencilState")]
215 #[deprecated = "Use `set_depth_stencil()` instead."]
216 pub fn depth_stencil(&mut self, val: &GpuDepthStencilState) -> &mut Self {
217 self.set_depth_stencil(val);
218 self
219 }
220 #[cfg(web_sys_unstable_apis)]
221 #[cfg(feature = "GpuFragmentState")]
222 #[deprecated = "Use `set_fragment()` instead."]
223 pub fn fragment(&mut self, val: &GpuFragmentState) -> &mut Self {
224 self.set_fragment(val);
225 self
226 }
227 #[cfg(web_sys_unstable_apis)]
228 #[cfg(feature = "GpuMultisampleState")]
229 #[deprecated = "Use `set_multisample()` instead."]
230 pub fn multisample(&mut self, val: &GpuMultisampleState) -> &mut Self {
231 self.set_multisample(val);
232 self
233 }
234 #[cfg(web_sys_unstable_apis)]
235 #[cfg(feature = "GpuPrimitiveState")]
236 #[deprecated = "Use `set_primitive()` instead."]
237 pub fn primitive(&mut self, val: &GpuPrimitiveState) -> &mut Self {
238 self.set_primitive(val);
239 self
240 }
241 #[cfg(web_sys_unstable_apis)]
242 #[cfg(feature = "GpuVertexState")]
243 #[deprecated = "Use `set_vertex()` instead."]
244 pub fn vertex(&mut self, val: &GpuVertexState) -> &mut Self {
245 self.set_vertex(val);
246 self
247 }
248}