web_sys/features/
gen_GpuBindGroupDescriptor.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 = GPUBindGroupDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuBindGroupDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"]
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 GpuBindGroupDescriptor;
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: `GpuBindGroupDescriptor`*"]
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: &GpuBindGroupDescriptor) -> 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: `GpuBindGroupDescriptor`*"]
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: &GpuBindGroupDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `entries` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"]
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 = "entries")]
43 pub fn get_entries(this: &GpuBindGroupDescriptor) -> ::js_sys::Array;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `entries` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"]
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 = "entries")]
52 pub fn set_entries(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuBindGroupLayout")]
55 #[doc = "Get the `layout` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"]
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 = "layout")]
62 pub fn get_layout(this: &GpuBindGroupDescriptor) -> GpuBindGroupLayout;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuBindGroupLayout")]
65 #[doc = "Change the `layout` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"]
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 = "layout")]
72 pub fn set_layout(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout);
73}
74#[cfg(web_sys_unstable_apis)]
75impl GpuBindGroupDescriptor {
76 #[cfg(feature = "GpuBindGroupLayout")]
77 #[doc = "Construct a new `GpuBindGroupDescriptor`."]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
83 pub fn new(entries: &::wasm_bindgen::JsValue, layout: &GpuBindGroupLayout) -> Self {
84 #[allow(unused_mut)]
85 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
86 ret.set_entries(entries);
87 ret.set_layout(layout);
88 ret
89 }
90 #[cfg(web_sys_unstable_apis)]
91 #[deprecated = "Use `set_label()` instead."]
92 pub fn label(&mut self, val: &str) -> &mut Self {
93 self.set_label(val);
94 self
95 }
96 #[cfg(web_sys_unstable_apis)]
97 #[deprecated = "Use `set_entries()` instead."]
98 pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
99 self.set_entries(val);
100 self
101 }
102 #[cfg(web_sys_unstable_apis)]
103 #[cfg(feature = "GpuBindGroupLayout")]
104 #[deprecated = "Use `set_layout()` instead."]
105 pub fn layout(&mut self, val: &GpuBindGroupLayout) -> &mut Self {
106 self.set_layout(val);
107 self
108 }
109}