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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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 #[doc = "Change the `layout` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"]
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 = "layout")]
52 pub fn set_layout(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuDepthStencilState")]
55 #[doc = "Get the `depthStencil` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"]
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 = "depthStencil")]
62 pub fn get_depth_stencil(this: &GpuRenderPipelineDescriptor) -> Option<GpuDepthStencilState>;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuDepthStencilState")]
65 #[doc = "Change the `depthStencil` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"]
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 = "depthStencil")]
72 pub fn set_depth_stencil(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState);
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(feature = "GpuFragmentState")]
75 #[doc = "Get the `fragment` field of this object."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"]
78 #[doc = ""]
79 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
81 #[wasm_bindgen(method, getter = "fragment")]
82 pub fn get_fragment(this: &GpuRenderPipelineDescriptor) -> Option<GpuFragmentState>;
83 #[cfg(web_sys_unstable_apis)]
84 #[cfg(feature = "GpuFragmentState")]
85 #[doc = "Change the `fragment` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"]
88 #[doc = ""]
89 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, setter = "fragment")]
92 pub fn set_fragment(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState);
93 #[cfg(web_sys_unstable_apis)]
94 #[cfg(feature = "GpuMultisampleState")]
95 #[doc = "Get the `multisample` field of this object."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 #[wasm_bindgen(method, getter = "multisample")]
102 pub fn get_multisample(this: &GpuRenderPipelineDescriptor) -> Option<GpuMultisampleState>;
103 #[cfg(web_sys_unstable_apis)]
104 #[cfg(feature = "GpuMultisampleState")]
105 #[doc = "Change the `multisample` field of this object."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"]
108 #[doc = ""]
109 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
111 #[wasm_bindgen(method, setter = "multisample")]
112 pub fn set_multisample(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState);
113 #[cfg(web_sys_unstable_apis)]
114 #[cfg(feature = "GpuPrimitiveState")]
115 #[doc = "Get the `primitive` field of this object."]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 #[wasm_bindgen(method, getter = "primitive")]
122 pub fn get_primitive(this: &GpuRenderPipelineDescriptor) -> Option<GpuPrimitiveState>;
123 #[cfg(web_sys_unstable_apis)]
124 #[cfg(feature = "GpuPrimitiveState")]
125 #[doc = "Change the `primitive` field of this object."]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"]
128 #[doc = ""]
129 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
130 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
131 #[wasm_bindgen(method, setter = "primitive")]
132 pub fn set_primitive(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState);
133 #[cfg(web_sys_unstable_apis)]
134 #[cfg(feature = "GpuVertexState")]
135 #[doc = "Get the `vertex` field of this object."]
136 #[doc = ""]
137 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
138 #[doc = ""]
139 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
140 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
141 #[wasm_bindgen(method, getter = "vertex")]
142 pub fn get_vertex(this: &GpuRenderPipelineDescriptor) -> GpuVertexState;
143 #[cfg(web_sys_unstable_apis)]
144 #[cfg(feature = "GpuVertexState")]
145 #[doc = "Change the `vertex` field of this object."]
146 #[doc = ""]
147 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
148 #[doc = ""]
149 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
150 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
151 #[wasm_bindgen(method, setter = "vertex")]
152 pub fn set_vertex(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState);
153}
154#[cfg(web_sys_unstable_apis)]
155impl GpuRenderPipelineDescriptor {
156 #[cfg(feature = "GpuVertexState")]
157 #[doc = "Construct a new `GpuRenderPipelineDescriptor`."]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"]
160 #[doc = ""]
161 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
162 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
163 pub fn new(layout: &::wasm_bindgen::JsValue, vertex: &GpuVertexState) -> Self {
164 #[allow(unused_mut)]
165 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
166 ret.set_layout(layout);
167 ret.set_vertex(vertex);
168 ret
169 }
170 #[cfg(web_sys_unstable_apis)]
171 #[deprecated = "Use `set_label()` instead."]
172 pub fn label(&mut self, val: &str) -> &mut Self {
173 self.set_label(val);
174 self
175 }
176 #[cfg(web_sys_unstable_apis)]
177 #[deprecated = "Use `set_layout()` instead."]
178 pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
179 self.set_layout(val);
180 self
181 }
182 #[cfg(web_sys_unstable_apis)]
183 #[cfg(feature = "GpuDepthStencilState")]
184 #[deprecated = "Use `set_depth_stencil()` instead."]
185 pub fn depth_stencil(&mut self, val: &GpuDepthStencilState) -> &mut Self {
186 self.set_depth_stencil(val);
187 self
188 }
189 #[cfg(web_sys_unstable_apis)]
190 #[cfg(feature = "GpuFragmentState")]
191 #[deprecated = "Use `set_fragment()` instead."]
192 pub fn fragment(&mut self, val: &GpuFragmentState) -> &mut Self {
193 self.set_fragment(val);
194 self
195 }
196 #[cfg(web_sys_unstable_apis)]
197 #[cfg(feature = "GpuMultisampleState")]
198 #[deprecated = "Use `set_multisample()` instead."]
199 pub fn multisample(&mut self, val: &GpuMultisampleState) -> &mut Self {
200 self.set_multisample(val);
201 self
202 }
203 #[cfg(web_sys_unstable_apis)]
204 #[cfg(feature = "GpuPrimitiveState")]
205 #[deprecated = "Use `set_primitive()` instead."]
206 pub fn primitive(&mut self, val: &GpuPrimitiveState) -> &mut Self {
207 self.set_primitive(val);
208 self
209 }
210 #[cfg(web_sys_unstable_apis)]
211 #[cfg(feature = "GpuVertexState")]
212 #[deprecated = "Use `set_vertex()` instead."]
213 pub fn vertex(&mut self, val: &GpuVertexState) -> &mut Self {
214 self.set_vertex(val);
215 self
216 }
217}