web_sys/features/
gen_GpuProgrammableStage.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 = GPUProgrammableStage)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuProgrammableStage` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"]
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 GpuProgrammableStage;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `constants` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"]
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 = "constants")]
25 pub fn get_constants(this: &GpuProgrammableStage)
26 -> Option<::js_sys::Object<::js_sys::Number>>;
27 #[cfg(web_sys_unstable_apis)]
28 #[doc = "Change the `constants` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 #[wasm_bindgen(method, setter = "constants")]
35 pub fn set_constants(this: &GpuProgrammableStage, val: &::js_sys::Object<::js_sys::Number>);
36 #[cfg(web_sys_unstable_apis)]
37 #[doc = "Get the `entryPoint` field of this object."]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"]
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 = "entryPoint")]
44 pub fn get_entry_point(this: &GpuProgrammableStage) -> Option<::alloc::string::String>;
45 #[cfg(web_sys_unstable_apis)]
46 #[doc = "Change the `entryPoint` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 #[wasm_bindgen(method, setter = "entryPoint")]
53 pub fn set_entry_point(this: &GpuProgrammableStage, val: &str);
54 #[cfg(web_sys_unstable_apis)]
55 #[cfg(feature = "GpuShaderModule")]
56 #[doc = "Get the `module` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "module")]
63 pub fn get_module(this: &GpuProgrammableStage) -> GpuShaderModule;
64 #[cfg(web_sys_unstable_apis)]
65 #[cfg(feature = "GpuShaderModule")]
66 #[doc = "Change the `module` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 #[wasm_bindgen(method, setter = "module")]
73 pub fn set_module(this: &GpuProgrammableStage, val: &GpuShaderModule);
74}
75#[cfg(web_sys_unstable_apis)]
76impl GpuProgrammableStage {
77 #[cfg(feature = "GpuShaderModule")]
78 #[doc = "Construct a new `GpuProgrammableStage`."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 pub fn new(module: &GpuShaderModule) -> Self {
85 #[allow(unused_mut)]
86 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
87 ret.set_module(module);
88 ret
89 }
90 #[cfg(web_sys_unstable_apis)]
91 #[deprecated = "Use `set_constants()` instead."]
92 pub fn constants(&mut self, val: &::js_sys::Object<::js_sys::Number>) -> &mut Self {
93 self.set_constants(val);
94 self
95 }
96 #[cfg(web_sys_unstable_apis)]
97 #[deprecated = "Use `set_entry_point()` instead."]
98 pub fn entry_point(&mut self, val: &str) -> &mut Self {
99 self.set_entry_point(val);
100 self
101 }
102 #[cfg(web_sys_unstable_apis)]
103 #[cfg(feature = "GpuShaderModule")]
104 #[deprecated = "Use `set_module()` instead."]
105 pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self {
106 self.set_module(val);
107 self
108 }
109}