web_sys/features/
gen_GpuShaderModuleCompilationHint.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(
9 extends = "::js_sys::Object",
10 js_name = "GPUShaderModuleCompilationHint"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `GpuShaderModuleCompilationHint` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
16 #[doc = ""]
17 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19 pub type GpuShaderModuleCompilationHint;
20 #[cfg(web_sys_unstable_apis)]
21 #[doc = "Get the `entryPoint` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
24 #[doc = ""]
25 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27 #[wasm_bindgen(method, getter = "entryPoint")]
28 pub fn get_entry_point(this: &GpuShaderModuleCompilationHint) -> ::alloc::string::String;
29 #[cfg(web_sys_unstable_apis)]
30 #[doc = "Change the `entryPoint` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
33 #[doc = ""]
34 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36 #[wasm_bindgen(method, setter = "entryPoint")]
37 pub fn set_entry_point(this: &GpuShaderModuleCompilationHint, val: &str);
38 #[cfg(web_sys_unstable_apis)]
39 #[cfg(feature = "GpuPipelineLayout")]
40 #[doc = "Get the `layout` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 #[wasm_bindgen(method, getter = "layout")]
47 pub fn get_layout(this: &GpuShaderModuleCompilationHint) -> ::wasm_bindgen::JsValue;
48 #[cfg(web_sys_unstable_apis)]
49 #[cfg(feature = "GpuPipelineLayout")]
50 #[doc = "Change the `layout` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 #[wasm_bindgen(method, setter = "layout")]
57 pub fn set_layout(this: &GpuShaderModuleCompilationHint, val: &GpuPipelineLayout);
58 #[cfg(web_sys_unstable_apis)]
59 #[cfg(feature = "GpuAutoLayoutMode")]
60 #[doc = "Change the `layout` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `GpuAutoLayoutMode`, `GpuShaderModuleCompilationHint`*"]
63 #[doc = ""]
64 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66 #[wasm_bindgen(method, setter = "layout")]
67 pub fn set_layout_gpu_auto_layout_mode(
68 this: &GpuShaderModuleCompilationHint,
69 val: GpuAutoLayoutMode,
70 );
71}
72#[cfg(web_sys_unstable_apis)]
73impl GpuShaderModuleCompilationHint {
74 #[doc = "Construct a new `GpuShaderModuleCompilationHint`."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 pub fn new(entry_point: &str) -> Self {
81 #[allow(unused_mut)]
82 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
83 ret.set_entry_point(entry_point);
84 ret
85 }
86 #[cfg(web_sys_unstable_apis)]
87 #[deprecated = "Use `set_entry_point()` instead."]
88 pub fn entry_point(&mut self, val: &str) -> &mut Self {
89 self.set_entry_point(val);
90 self
91 }
92 #[cfg(web_sys_unstable_apis)]
93 #[cfg(feature = "GpuPipelineLayout")]
94 #[deprecated = "Use `set_layout()` instead."]
95 pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self {
96 self.set_layout(val);
97 self
98 }
99}