Skip to main content

web_sys/features/
gen_GpuPipelineLayoutDescriptor.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 (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::JsOption<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::JsOption<GpuBindGroupLayout>],
59    );
60}
61#[cfg(web_sys_unstable_apis)]
62impl GpuPipelineLayoutDescriptor {
63    #[cfg(feature = "GpuBindGroupLayout")]
64    #[doc = "Construct a new `GpuPipelineLayoutDescriptor`."]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayout`, `GpuPipelineLayoutDescriptor`*"]
67    #[doc = ""]
68    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
69    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
70    pub fn new(bind_group_layouts: &[::js_sys::JsOption<GpuBindGroupLayout>]) -> Self {
71        #[allow(unused_mut)]
72        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
73        ret.set_bind_group_layouts(bind_group_layouts);
74        ret
75    }
76    #[cfg(web_sys_unstable_apis)]
77    #[deprecated = "Use `set_label()` instead."]
78    pub fn label(&mut self, val: &str) -> &mut Self {
79        self.set_label(val);
80        self
81    }
82    #[cfg(web_sys_unstable_apis)]
83    #[cfg(feature = "GpuBindGroupLayout")]
84    #[deprecated = "Use `set_bind_group_layouts()` instead."]
85    pub fn bind_group_layouts(
86        &mut self,
87        val: &[::js_sys::JsOption<GpuBindGroupLayout>],
88    ) -> &mut Self {
89        self.set_bind_group_layouts(val);
90        self
91    }
92}