web_sys/features/
gen_GpuPipelineLayoutDescriptor.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 = "GPUPipelineLayoutDescriptor")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuPipelineLayoutDescriptor` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"]
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 GpuPipelineLayoutDescriptor;
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: `GpuPipelineLayoutDescriptor`*"]
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: &GpuPipelineLayoutDescriptor) -> 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: `GpuPipelineLayoutDescriptor`*"]
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: &GpuPipelineLayoutDescriptor, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuBindGroupLayout")]
37 #[doc = "Get the `bindGroupLayouts` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"]
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 = "bindGroupLayouts")]
44 pub fn get_bind_group_layouts(
45 this: &GpuPipelineLayoutDescriptor,
46 ) -> ::js_sys::Array<::js_sys::JsNullable<GpuBindGroupLayout>>;
47 #[cfg(web_sys_unstable_apis)]
48 #[cfg(feature = "GpuBindGroupLayout")]
49 #[doc = "Change the `bindGroupLayouts` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"]
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 = "bindGroupLayouts")]
56 pub fn set_bind_group_layouts(
57 this: &GpuPipelineLayoutDescriptor,
58 val: &[::js_sys::JsNullable<GpuBindGroupLayout>],
59 );
60 #[cfg(web_sys_unstable_apis)]
61 #[doc = "Get the `immediateSize` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"]
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 #[wasm_bindgen(method, getter = "immediateSize")]
68 pub fn get_immediate_size(this: &GpuPipelineLayoutDescriptor) -> Option<u32>;
69 #[cfg(web_sys_unstable_apis)]
70 #[doc = "Change the `immediateSize` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"]
73 #[doc = ""]
74 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
76 #[wasm_bindgen(method, setter = "immediateSize")]
77 pub fn set_immediate_size(this: &GpuPipelineLayoutDescriptor, val: u32);
78}
79#[cfg(web_sys_unstable_apis)]
80impl GpuPipelineLayoutDescriptor {
81 #[cfg(feature = "GpuBindGroupLayout")]
82 #[doc = "Construct a new `GpuPipelineLayoutDescriptor`."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
88 pub fn new(bind_group_layouts: &[::js_sys::JsNullable<GpuBindGroupLayout>]) -> Self {
89 #[allow(unused_mut)]
90 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
91 ret.set_bind_group_layouts(bind_group_layouts);
92 ret
93 }
94 #[cfg(web_sys_unstable_apis)]
95 #[deprecated = "Use `set_label()` instead."]
96 pub fn label(&mut self, val: &str) -> &mut Self {
97 self.set_label(val);
98 self
99 }
100 #[cfg(web_sys_unstable_apis)]
101 #[cfg(feature = "GpuBindGroupLayout")]
102 #[deprecated = "Use `set_bind_group_layouts()` instead."]
103 pub fn bind_group_layouts(
104 &mut self,
105 val: &[::js_sys::JsNullable<GpuBindGroupLayout>],
106 ) -> &mut Self {
107 self.set_bind_group_layouts(val);
108 self
109 }
110 #[cfg(web_sys_unstable_apis)]
111 #[deprecated = "Use `set_immediate_size()` instead."]
112 pub fn immediate_size(&mut self, val: u32) -> &mut Self {
113 self.set_immediate_size(val);
114 self
115 }
116}