web_sys/features/
gen_GpuBindGroupLayoutEntry.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 = GPUBindGroupLayoutEntry)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuBindGroupLayoutEntry` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
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 GpuBindGroupLayoutEntry;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `binding` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
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 = "binding")]
25 pub fn get_binding(this: &GpuBindGroupLayoutEntry) -> u32;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `binding` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
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 = "binding")]
34 pub fn set_binding(this: &GpuBindGroupLayoutEntry, val: u32);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuBufferBindingLayout")]
37 #[doc = "Get the `buffer` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"]
40 #[doc = ""]
41 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43 #[wasm_bindgen(method, getter = "buffer")]
44 pub fn get_buffer(this: &GpuBindGroupLayoutEntry) -> Option<GpuBufferBindingLayout>;
45 #[cfg(web_sys_unstable_apis)]
46 #[cfg(feature = "GpuBufferBindingLayout")]
47 #[doc = "Change the `buffer` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "buffer")]
54 pub fn set_buffer(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout);
55 #[cfg(web_sys_unstable_apis)]
56 #[cfg(feature = "GpuExternalTextureBindingLayout")]
57 #[doc = "Get the `externalTexture` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 #[wasm_bindgen(method, getter = "externalTexture")]
64 pub fn get_external_texture(
65 this: &GpuBindGroupLayoutEntry,
66 ) -> Option<GpuExternalTextureBindingLayout>;
67 #[cfg(web_sys_unstable_apis)]
68 #[cfg(feature = "GpuExternalTextureBindingLayout")]
69 #[doc = "Change the `externalTexture` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "externalTexture")]
76 pub fn set_external_texture(
77 this: &GpuBindGroupLayoutEntry,
78 val: &GpuExternalTextureBindingLayout,
79 );
80 #[cfg(web_sys_unstable_apis)]
81 #[cfg(feature = "GpuSamplerBindingLayout")]
82 #[doc = "Get the `sampler` field of this object."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"]
85 #[doc = ""]
86 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 #[wasm_bindgen(method, getter = "sampler")]
89 pub fn get_sampler(this: &GpuBindGroupLayoutEntry) -> Option<GpuSamplerBindingLayout>;
90 #[cfg(web_sys_unstable_apis)]
91 #[cfg(feature = "GpuSamplerBindingLayout")]
92 #[doc = "Change the `sampler` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 #[wasm_bindgen(method, setter = "sampler")]
99 pub fn set_sampler(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout);
100 #[cfg(web_sys_unstable_apis)]
101 #[cfg(feature = "GpuStorageTextureBindingLayout")]
102 #[doc = "Get the `storageTexture` field of this object."]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"]
105 #[doc = ""]
106 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
107 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
108 #[wasm_bindgen(method, getter = "storageTexture")]
109 pub fn get_storage_texture(
110 this: &GpuBindGroupLayoutEntry,
111 ) -> Option<GpuStorageTextureBindingLayout>;
112 #[cfg(web_sys_unstable_apis)]
113 #[cfg(feature = "GpuStorageTextureBindingLayout")]
114 #[doc = "Change the `storageTexture` field of this object."]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"]
117 #[doc = ""]
118 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
119 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
120 #[wasm_bindgen(method, setter = "storageTexture")]
121 pub fn set_storage_texture(
122 this: &GpuBindGroupLayoutEntry,
123 val: &GpuStorageTextureBindingLayout,
124 );
125 #[cfg(web_sys_unstable_apis)]
126 #[cfg(feature = "GpuTextureBindingLayout")]
127 #[doc = "Get the `texture` field of this object."]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"]
130 #[doc = ""]
131 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
133 #[wasm_bindgen(method, getter = "texture")]
134 pub fn get_texture(this: &GpuBindGroupLayoutEntry) -> Option<GpuTextureBindingLayout>;
135 #[cfg(web_sys_unstable_apis)]
136 #[cfg(feature = "GpuTextureBindingLayout")]
137 #[doc = "Change the `texture` field of this object."]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"]
140 #[doc = ""]
141 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
142 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
143 #[wasm_bindgen(method, setter = "texture")]
144 pub fn set_texture(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout);
145 #[cfg(web_sys_unstable_apis)]
146 #[doc = "Get the `visibility` field of this object."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
149 #[doc = ""]
150 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
152 #[wasm_bindgen(method, getter = "visibility")]
153 pub fn get_visibility(this: &GpuBindGroupLayoutEntry) -> u32;
154 #[cfg(web_sys_unstable_apis)]
155 #[doc = "Change the `visibility` field of this object."]
156 #[doc = ""]
157 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
158 #[doc = ""]
159 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
160 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
161 #[wasm_bindgen(method, setter = "visibility")]
162 pub fn set_visibility(this: &GpuBindGroupLayoutEntry, val: u32);
163}
164#[cfg(web_sys_unstable_apis)]
165impl GpuBindGroupLayoutEntry {
166 #[doc = "Construct a new `GpuBindGroupLayoutEntry`."]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"]
169 #[doc = ""]
170 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
172 pub fn new(binding: u32, visibility: u32) -> Self {
173 #[allow(unused_mut)]
174 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
175 ret.set_binding(binding);
176 ret.set_visibility(visibility);
177 ret
178 }
179 #[cfg(web_sys_unstable_apis)]
180 #[deprecated = "Use `set_binding()` instead."]
181 pub fn binding(&mut self, val: u32) -> &mut Self {
182 self.set_binding(val);
183 self
184 }
185 #[cfg(web_sys_unstable_apis)]
186 #[cfg(feature = "GpuBufferBindingLayout")]
187 #[deprecated = "Use `set_buffer()` instead."]
188 pub fn buffer(&mut self, val: &GpuBufferBindingLayout) -> &mut Self {
189 self.set_buffer(val);
190 self
191 }
192 #[cfg(web_sys_unstable_apis)]
193 #[cfg(feature = "GpuExternalTextureBindingLayout")]
194 #[deprecated = "Use `set_external_texture()` instead."]
195 pub fn external_texture(&mut self, val: &GpuExternalTextureBindingLayout) -> &mut Self {
196 self.set_external_texture(val);
197 self
198 }
199 #[cfg(web_sys_unstable_apis)]
200 #[cfg(feature = "GpuSamplerBindingLayout")]
201 #[deprecated = "Use `set_sampler()` instead."]
202 pub fn sampler(&mut self, val: &GpuSamplerBindingLayout) -> &mut Self {
203 self.set_sampler(val);
204 self
205 }
206 #[cfg(web_sys_unstable_apis)]
207 #[cfg(feature = "GpuStorageTextureBindingLayout")]
208 #[deprecated = "Use `set_storage_texture()` instead."]
209 pub fn storage_texture(&mut self, val: &GpuStorageTextureBindingLayout) -> &mut Self {
210 self.set_storage_texture(val);
211 self
212 }
213 #[cfg(web_sys_unstable_apis)]
214 #[cfg(feature = "GpuTextureBindingLayout")]
215 #[deprecated = "Use `set_texture()` instead."]
216 pub fn texture(&mut self, val: &GpuTextureBindingLayout) -> &mut Self {
217 self.set_texture(val);
218 self
219 }
220 #[cfg(web_sys_unstable_apis)]
221 #[deprecated = "Use `set_visibility()` instead."]
222 pub fn visibility(&mut self, val: u32) -> &mut Self {
223 self.set_visibility(val);
224 self
225 }
226}