web_sys/features/
gen_GpuBindGroupLayoutDescriptor.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 = GPUBindGroupLayoutDescriptor)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuBindGroupLayoutDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"]
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 GpuBindGroupLayoutDescriptor;
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: `GpuBindGroupLayoutDescriptor`*"]
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: &GpuBindGroupLayoutDescriptor) -> 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: `GpuBindGroupLayoutDescriptor`*"]
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: &GpuBindGroupLayoutDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuBindGroupLayoutEntry")]
37 #[doc = "Get the `entries` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
43 #[wasm_bindgen(method, getter = "entries")]
44 pub fn get_entries(
45 this: &GpuBindGroupLayoutDescriptor,
46 ) -> ::js_sys::Array<GpuBindGroupLayoutEntry>;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "GpuBindGroupLayoutEntry")]
49 #[doc = "Change the `entries` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "entries")]
56 pub fn set_entries(this: &GpuBindGroupLayoutDescriptor, val: &[GpuBindGroupLayoutEntry]);
57}
58#[cfg(web_sys_unstable_apis)]
59impl GpuBindGroupLayoutDescriptor {
60 #[cfg(feature = "GpuBindGroupLayoutEntry")]
61 #[doc = "Construct a new `GpuBindGroupLayoutDescriptor`."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`, `GpuBindGroupLayoutEntry`*"]
64 #[doc = ""]
65 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67 pub fn new(entries: &[GpuBindGroupLayoutEntry]) -> Self {
68 #[allow(unused_mut)]
69 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
70 ret.set_entries(entries);
71 ret
72 }
73 #[cfg(web_sys_unstable_apis)]
74 #[deprecated = "Use `set_label()` instead."]
75 pub fn label(&mut self, val: &str) -> &mut Self {
76 self.set_label(val);
77 self
78 }
79 #[cfg(web_sys_unstable_apis)]
80 #[cfg(feature = "GpuBindGroupLayoutEntry")]
81 #[deprecated = "Use `set_entries()` instead."]
82 pub fn entries(&mut self, val: &[GpuBindGroupLayoutEntry]) -> &mut Self {
83 self.set_entries(val);
84 self
85 }
86}