Skip to main content

web_sys/features/
gen_GpuDevice.rs

1#![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(
9        extends = "EventTarget",
10        extends = "::js_sys::Object",
11        js_name = "GPUDevice",
12        typescript_type = "GPUDevice"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `GpuDevice` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
20    #[doc = ""]
21    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23    pub type GpuDevice;
24    #[cfg(web_sys_unstable_apis)]
25    #[cfg(feature = "GpuSupportedFeatures")]
26    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "features")]
27    #[doc = "Getter for the `features` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/features)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSupportedFeatures`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    pub fn features(this: &GpuDevice) -> GpuSupportedFeatures;
36    #[cfg(web_sys_unstable_apis)]
37    #[cfg(feature = "GpuSupportedLimits")]
38    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "limits")]
39    #[doc = "Getter for the `limits` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/limits)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSupportedLimits`*"]
44    #[doc = ""]
45    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
46    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
47    pub fn limits(this: &GpuDevice) -> GpuSupportedLimits;
48    #[cfg(web_sys_unstable_apis)]
49    #[cfg(feature = "GpuAdapterInfo")]
50    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "adapterInfo")]
51    #[doc = "Getter for the `adapterInfo` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/adapterInfo)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `GpuAdapterInfo`, `GpuDevice`*"]
56    #[doc = ""]
57    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
59    pub fn adapter_info(this: &GpuDevice) -> GpuAdapterInfo;
60    #[cfg(web_sys_unstable_apis)]
61    #[cfg(feature = "GpuQueue")]
62    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "queue")]
63    #[doc = "Getter for the `queue` field of this object."]
64    #[doc = ""]
65    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/queue)"]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuQueue`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71    pub fn queue(this: &GpuDevice) -> GpuQueue;
72    #[cfg(web_sys_unstable_apis)]
73    #[cfg(feature = "GpuDeviceLostInfo")]
74    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "lost")]
75    #[doc = "Getter for the `lost` field of this object."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/lost)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuDeviceLostInfo`*"]
80    #[doc = ""]
81    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
82    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
83    pub fn lost(this: &GpuDevice) -> ::js_sys::Promise<GpuDeviceLostInfo>;
84    #[cfg(web_sys_unstable_apis)]
85    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "onuncapturederror")]
86    #[doc = "Getter for the `onuncapturederror` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/onuncapturederror)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
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    pub fn onuncapturederror(this: &GpuDevice) -> Option<::js_sys::Function>;
95    #[cfg(web_sys_unstable_apis)]
96    #[wasm_bindgen(method, setter, js_class = "GPUDevice", js_name = "onuncapturederror")]
97    #[doc = "Setter for the `onuncapturederror` field of this object."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/onuncapturederror)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
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 set_onuncapturederror(this: &GpuDevice, value: Option<&::js_sys::Function>);
106    #[cfg(web_sys_unstable_apis)]
107    #[wasm_bindgen(method, getter, js_class = "GPUDevice", js_name = "label")]
108    #[doc = "Getter for the `label` field of this object."]
109    #[doc = ""]
110    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/label)"]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
113    #[doc = ""]
114    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
116    pub fn label(this: &GpuDevice) -> ::alloc::string::String;
117    #[cfg(web_sys_unstable_apis)]
118    #[wasm_bindgen(method, setter, js_class = "GPUDevice", js_name = "label")]
119    #[doc = "Setter for the `label` field of this object."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/label)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
124    #[doc = ""]
125    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
127    pub fn set_label(this: &GpuDevice, value: &str);
128    #[cfg(web_sys_unstable_apis)]
129    #[cfg(all(feature = "GpuBindGroup", feature = "GpuBindGroupDescriptor",))]
130    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createBindGroup")]
131    #[doc = "The `createBindGroup()` method."]
132    #[doc = ""]
133    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBindGroup)"]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `GpuBindGroup`, `GpuBindGroupDescriptor`, `GpuDevice`*"]
136    #[doc = ""]
137    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
139    pub fn create_bind_group(this: &GpuDevice, descriptor: &GpuBindGroupDescriptor)
140        -> GpuBindGroup;
141    #[cfg(web_sys_unstable_apis)]
142    #[cfg(all(
143        feature = "GpuBindGroupLayout",
144        feature = "GpuBindGroupLayoutDescriptor",
145    ))]
146    #[wasm_bindgen(
147        catch,
148        method,
149        js_class = "GPUDevice",
150        js_name = "createBindGroupLayout"
151    )]
152    #[doc = "The `createBindGroupLayout()` method."]
153    #[doc = ""]
154    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBindGroupLayout)"]
155    #[doc = ""]
156    #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuBindGroupLayoutDescriptor`, `GpuDevice`*"]
157    #[doc = ""]
158    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
159    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
160    pub fn create_bind_group_layout(
161        this: &GpuDevice,
162        descriptor: &GpuBindGroupLayoutDescriptor,
163    ) -> Result<GpuBindGroupLayout, JsValue>;
164    #[cfg(web_sys_unstable_apis)]
165    #[cfg(all(feature = "GpuBuffer", feature = "GpuBufferDescriptor",))]
166    #[wasm_bindgen(catch, method, js_class = "GPUDevice", js_name = "createBuffer")]
167    #[doc = "The `createBuffer()` method."]
168    #[doc = ""]
169    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createBuffer)"]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferDescriptor`, `GpuDevice`*"]
172    #[doc = ""]
173    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
174    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
175    pub fn create_buffer(
176        this: &GpuDevice,
177        descriptor: &GpuBufferDescriptor,
178    ) -> Result<GpuBuffer, JsValue>;
179    #[cfg(web_sys_unstable_apis)]
180    #[cfg(feature = "GpuCommandEncoder")]
181    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createCommandEncoder")]
182    #[doc = "The `createCommandEncoder()` method."]
183    #[doc = ""]
184    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createCommandEncoder)"]
185    #[doc = ""]
186    #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoder`, `GpuDevice`*"]
187    #[doc = ""]
188    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
189    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
190    pub fn create_command_encoder(this: &GpuDevice) -> GpuCommandEncoder;
191    #[cfg(web_sys_unstable_apis)]
192    #[cfg(all(feature = "GpuCommandEncoder", feature = "GpuCommandEncoderDescriptor",))]
193    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createCommandEncoder")]
194    #[doc = "The `createCommandEncoder()` method."]
195    #[doc = ""]
196    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createCommandEncoder)"]
197    #[doc = ""]
198    #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoder`, `GpuCommandEncoderDescriptor`, `GpuDevice`*"]
199    #[doc = ""]
200    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
201    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
202    pub fn create_command_encoder_with_descriptor(
203        this: &GpuDevice,
204        descriptor: &GpuCommandEncoderDescriptor,
205    ) -> GpuCommandEncoder;
206    #[cfg(web_sys_unstable_apis)]
207    #[cfg(all(
208        feature = "GpuComputePipeline",
209        feature = "GpuComputePipelineDescriptor",
210    ))]
211    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createComputePipeline")]
212    #[doc = "The `createComputePipeline()` method."]
213    #[doc = ""]
214    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createComputePipeline)"]
215    #[doc = ""]
216    #[doc = "*This API requires the following crate features to be activated: `GpuComputePipeline`, `GpuComputePipelineDescriptor`, `GpuDevice`*"]
217    #[doc = ""]
218    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
219    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
220    pub fn create_compute_pipeline(
221        this: &GpuDevice,
222        descriptor: &GpuComputePipelineDescriptor,
223    ) -> GpuComputePipeline;
224    #[cfg(web_sys_unstable_apis)]
225    #[cfg(all(
226        feature = "GpuComputePipeline",
227        feature = "GpuComputePipelineDescriptor",
228    ))]
229    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createComputePipelineAsync")]
230    #[doc = "The `createComputePipelineAsync()` method."]
231    #[doc = ""]
232    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createComputePipelineAsync)"]
233    #[doc = ""]
234    #[doc = "*This API requires the following crate features to be activated: `GpuComputePipeline`, `GpuComputePipelineDescriptor`, `GpuDevice`*"]
235    #[doc = ""]
236    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
237    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
238    pub fn create_compute_pipeline_async(
239        this: &GpuDevice,
240        descriptor: &GpuComputePipelineDescriptor,
241    ) -> ::js_sys::Promise<GpuComputePipeline>;
242    #[cfg(web_sys_unstable_apis)]
243    #[cfg(all(feature = "GpuPipelineLayout", feature = "GpuPipelineLayoutDescriptor",))]
244    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createPipelineLayout")]
245    #[doc = "The `createPipelineLayout()` method."]
246    #[doc = ""]
247    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createPipelineLayout)"]
248    #[doc = ""]
249    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuPipelineLayout`, `GpuPipelineLayoutDescriptor`*"]
250    #[doc = ""]
251    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
252    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
253    pub fn create_pipeline_layout(
254        this: &GpuDevice,
255        descriptor: &GpuPipelineLayoutDescriptor,
256    ) -> GpuPipelineLayout;
257    #[cfg(web_sys_unstable_apis)]
258    #[cfg(all(feature = "GpuQuerySet", feature = "GpuQuerySetDescriptor",))]
259    #[wasm_bindgen(catch, method, js_class = "GPUDevice", js_name = "createQuerySet")]
260    #[doc = "The `createQuerySet()` method."]
261    #[doc = ""]
262    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createQuerySet)"]
263    #[doc = ""]
264    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuQuerySet`, `GpuQuerySetDescriptor`*"]
265    #[doc = ""]
266    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
267    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
268    pub fn create_query_set(
269        this: &GpuDevice,
270        descriptor: &GpuQuerySetDescriptor,
271    ) -> Result<GpuQuerySet, JsValue>;
272    #[cfg(web_sys_unstable_apis)]
273    #[cfg(all(
274        feature = "GpuRenderBundleEncoder",
275        feature = "GpuRenderBundleEncoderDescriptor",
276    ))]
277    #[wasm_bindgen(
278        catch,
279        method,
280        js_class = "GPUDevice",
281        js_name = "createRenderBundleEncoder"
282    )]
283    #[doc = "The `createRenderBundleEncoder()` method."]
284    #[doc = ""]
285    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderBundleEncoder)"]
286    #[doc = ""]
287    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderBundleEncoder`, `GpuRenderBundleEncoderDescriptor`*"]
288    #[doc = ""]
289    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
290    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
291    pub fn create_render_bundle_encoder(
292        this: &GpuDevice,
293        descriptor: &GpuRenderBundleEncoderDescriptor,
294    ) -> Result<GpuRenderBundleEncoder, JsValue>;
295    #[cfg(web_sys_unstable_apis)]
296    #[cfg(all(feature = "GpuRenderPipeline", feature = "GpuRenderPipelineDescriptor",))]
297    #[wasm_bindgen(
298        catch,
299        method,
300        js_class = "GPUDevice",
301        js_name = "createRenderPipeline"
302    )]
303    #[doc = "The `createRenderPipeline()` method."]
304    #[doc = ""]
305    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipeline)"]
306    #[doc = ""]
307    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipeline`, `GpuRenderPipelineDescriptor`*"]
308    #[doc = ""]
309    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
310    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
311    pub fn create_render_pipeline(
312        this: &GpuDevice,
313        descriptor: &GpuRenderPipelineDescriptor,
314    ) -> Result<GpuRenderPipeline, JsValue>;
315    #[cfg(web_sys_unstable_apis)]
316    #[cfg(all(feature = "GpuRenderPipeline", feature = "GpuRenderPipelineDescriptor",))]
317    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createRenderPipelineAsync")]
318    #[doc = "The `createRenderPipelineAsync()` method."]
319    #[doc = ""]
320    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync)"]
321    #[doc = ""]
322    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuRenderPipeline`, `GpuRenderPipelineDescriptor`*"]
323    #[doc = ""]
324    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
325    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
326    pub fn create_render_pipeline_async(
327        this: &GpuDevice,
328        descriptor: &GpuRenderPipelineDescriptor,
329    ) -> ::js_sys::Promise<GpuRenderPipeline>;
330    #[cfg(web_sys_unstable_apis)]
331    #[cfg(feature = "GpuSampler")]
332    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createSampler")]
333    #[doc = "The `createSampler()` method."]
334    #[doc = ""]
335    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createSampler)"]
336    #[doc = ""]
337    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSampler`*"]
338    #[doc = ""]
339    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
340    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
341    pub fn create_sampler(this: &GpuDevice) -> GpuSampler;
342    #[cfg(web_sys_unstable_apis)]
343    #[cfg(all(feature = "GpuSampler", feature = "GpuSamplerDescriptor",))]
344    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createSampler")]
345    #[doc = "The `createSampler()` method."]
346    #[doc = ""]
347    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createSampler)"]
348    #[doc = ""]
349    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuSampler`, `GpuSamplerDescriptor`*"]
350    #[doc = ""]
351    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
352    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
353    pub fn create_sampler_with_descriptor(
354        this: &GpuDevice,
355        descriptor: &GpuSamplerDescriptor,
356    ) -> GpuSampler;
357    #[cfg(web_sys_unstable_apis)]
358    #[cfg(all(feature = "GpuShaderModule", feature = "GpuShaderModuleDescriptor",))]
359    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "createShaderModule")]
360    #[doc = "The `createShaderModule()` method."]
361    #[doc = ""]
362    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createShaderModule)"]
363    #[doc = ""]
364    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuShaderModule`, `GpuShaderModuleDescriptor`*"]
365    #[doc = ""]
366    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
367    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
368    pub fn create_shader_module(
369        this: &GpuDevice,
370        descriptor: &GpuShaderModuleDescriptor,
371    ) -> GpuShaderModule;
372    #[cfg(web_sys_unstable_apis)]
373    #[cfg(all(feature = "GpuTexture", feature = "GpuTextureDescriptor",))]
374    #[wasm_bindgen(catch, method, js_class = "GPUDevice", js_name = "createTexture")]
375    #[doc = "The `createTexture()` method."]
376    #[doc = ""]
377    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/createTexture)"]
378    #[doc = ""]
379    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuTexture`, `GpuTextureDescriptor`*"]
380    #[doc = ""]
381    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
382    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
383    pub fn create_texture(
384        this: &GpuDevice,
385        descriptor: &GpuTextureDescriptor,
386    ) -> Result<GpuTexture, JsValue>;
387    #[cfg(web_sys_unstable_apis)]
388    #[wasm_bindgen(method, js_class = "GPUDevice")]
389    #[doc = "The `destroy()` method."]
390    #[doc = ""]
391    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/destroy)"]
392    #[doc = ""]
393    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`*"]
394    #[doc = ""]
395    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
396    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
397    pub fn destroy(this: &GpuDevice);
398    #[cfg(web_sys_unstable_apis)]
399    #[cfg(all(
400        feature = "GpuExternalTexture",
401        feature = "GpuExternalTextureDescriptor",
402    ))]
403    #[wasm_bindgen(
404        catch,
405        method,
406        js_class = "GPUDevice",
407        js_name = "importExternalTexture"
408    )]
409    #[doc = "The `importExternalTexture()` method."]
410    #[doc = ""]
411    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/importExternalTexture)"]
412    #[doc = ""]
413    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuExternalTexture`, `GpuExternalTextureDescriptor`*"]
414    #[doc = ""]
415    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
416    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
417    pub fn import_external_texture(
418        this: &GpuDevice,
419        descriptor: &GpuExternalTextureDescriptor,
420    ) -> Result<GpuExternalTexture, JsValue>;
421    #[cfg(web_sys_unstable_apis)]
422    #[cfg(feature = "GpuError")]
423    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "popErrorScope")]
424    #[doc = "The `popErrorScope()` method."]
425    #[doc = ""]
426    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/popErrorScope)"]
427    #[doc = ""]
428    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuError`*"]
429    #[doc = ""]
430    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
431    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
432    pub fn pop_error_scope(this: &GpuDevice) -> ::js_sys::Promise<::js_sys::JsOption<GpuError>>;
433    #[cfg(web_sys_unstable_apis)]
434    #[cfg(feature = "GpuErrorFilter")]
435    #[wasm_bindgen(method, js_class = "GPUDevice", js_name = "pushErrorScope")]
436    #[doc = "The `pushErrorScope()` method."]
437    #[doc = ""]
438    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice/pushErrorScope)"]
439    #[doc = ""]
440    #[doc = "*This API requires the following crate features to be activated: `GpuDevice`, `GpuErrorFilter`*"]
441    #[doc = ""]
442    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
443    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
444    pub fn push_error_scope(this: &GpuDevice, filter: GpuErrorFilter);
445}