web_sys/features/
gen_GpuPipelineDescriptorBase.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 = GPUPipelineDescriptorBase)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuPipelineDescriptorBase` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"]
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 GpuPipelineDescriptorBase;
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: `GpuPipelineDescriptorBase`*"]
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: &GpuPipelineDescriptorBase) -> 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: `GpuPipelineDescriptorBase`*"]
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: &GpuPipelineDescriptorBase, val: &str);
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "GpuPipelineLayout")]
37 #[doc = "Get the `layout` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"]
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 = "layout")]
44 pub fn get_layout(this: &GpuPipelineDescriptorBase) -> ::wasm_bindgen::JsValue;
45 #[cfg(web_sys_unstable_apis)]
46 #[cfg(feature = "GpuPipelineLayout")]
47 #[doc = "Change the `layout` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "layout")]
54 pub fn set_layout(this: &GpuPipelineDescriptorBase, val: &GpuPipelineLayout);
55 #[cfg(web_sys_unstable_apis)]
56 #[cfg(feature = "GpuAutoLayoutMode")]
57 #[doc = "Change the `layout` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuPipelineDescriptorBase`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 #[wasm_bindgen(method, setter = "layout")]
64 pub fn set_layout_gpu_auto_layout_mode(
65 this: &GpuPipelineDescriptorBase,
66 val: GpuAutoLayoutMode,
67 );
68}
69#[cfg(web_sys_unstable_apis)]
70impl GpuPipelineDescriptorBase {
71 #[cfg(feature = "GpuPipelineLayout")]
72 #[doc = "Construct a new `GpuPipelineDescriptorBase`."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`, `GpuPipelineLayout`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 pub fn new(layout: &GpuPipelineLayout) -> Self {
79 #[allow(unused_mut)]
80 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
81 ret.set_layout(layout);
82 ret
83 }
84 #[cfg(feature = "GpuAutoLayoutMode")]
85 #[doc = "Construct a new `GpuPipelineDescriptorBase`."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuPipelineDescriptorBase`*"]
88 #[doc = ""]
89 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 pub fn new_with_gpu_auto_layout_mode(layout: GpuAutoLayoutMode) -> Self {
92 #[allow(unused_mut)]
93 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
94 ret.set_layout_gpu_auto_layout_mode(layout);
95 ret
96 }
97 #[cfg(web_sys_unstable_apis)]
98 #[deprecated = "Use `set_label()` instead."]
99 pub fn label(&mut self, val: &str) -> &mut Self {
100 self.set_label(val);
101 self
102 }
103 #[cfg(web_sys_unstable_apis)]
104 #[cfg(feature = "GpuPipelineLayout")]
105 #[deprecated = "Use `set_layout()` instead."]
106 pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self {
107 self.set_layout(val);
108 self
109 }
110}