Skip to main content

web_sys/features/
gen_GpuShaderModuleCompilationHint.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 = GPUShaderModuleCompilationHint)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuShaderModuleCompilationHint` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
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 GpuShaderModuleCompilationHint;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `entryPoint` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
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 = "entryPoint")]
25    pub fn get_entry_point(this: &GpuShaderModuleCompilationHint) -> ::alloc::string::String;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `entryPoint` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
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 = "entryPoint")]
34    pub fn set_entry_point(this: &GpuShaderModuleCompilationHint, 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: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"]
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: &GpuShaderModuleCompilationHint) -> ::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: `GpuPipelineLayout`, `GpuShaderModuleCompilationHint`*"]
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: &GpuShaderModuleCompilationHint, 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`, `GpuShaderModuleCompilationHint`*"]
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: &GpuShaderModuleCompilationHint,
66        val: GpuAutoLayoutMode,
67    );
68}
69#[cfg(web_sys_unstable_apis)]
70impl GpuShaderModuleCompilationHint {
71    #[doc = "Construct a new `GpuShaderModuleCompilationHint`."]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"]
74    #[doc = ""]
75    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
76    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
77    pub fn new(entry_point: &str) -> Self {
78        #[allow(unused_mut)]
79        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
80        ret.set_entry_point(entry_point);
81        ret
82    }
83    #[cfg(web_sys_unstable_apis)]
84    #[deprecated = "Use `set_entry_point()` instead."]
85    pub fn entry_point(&mut self, val: &str) -> &mut Self {
86        self.set_entry_point(val);
87        self
88    }
89    #[cfg(web_sys_unstable_apis)]
90    #[cfg(feature = "GpuPipelineLayout")]
91    #[deprecated = "Use `set_layout()` instead."]
92    pub fn layout(&mut self, val: &GpuPipelineLayout) -> &mut Self {
93        self.set_layout(val);
94        self
95    }
96}