web_sys/features/
gen_GpuVertexState.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 = GPUVertexState)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuVertexState` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type GpuVertexState;
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: `GpuVertexState`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "constants")]
25 pub fn get_constants(this: &GpuVertexState) -> Option<::js_sys::Object>;
26 #[cfg(web_sys_unstable_apis)]
27 #[doc = "Change the `constants` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33 #[wasm_bindgen(method, setter = "constants")]
34 pub fn set_constants(this: &GpuVertexState, val: &::js_sys::Object);
35 #[cfg(web_sys_unstable_apis)]
36 #[doc = "Get the `entryPoint` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 #[wasm_bindgen(method, getter = "entryPoint")]
43 pub fn get_entry_point(this: &GpuVertexState) -> Option<::alloc::string::String>;
44 #[cfg(web_sys_unstable_apis)]
45 #[doc = "Change the `entryPoint` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 #[wasm_bindgen(method, setter = "entryPoint")]
52 pub fn set_entry_point(this: &GpuVertexState, val: &str);
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "GpuShaderModule")]
55 #[doc = "Get the `module` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"]
58 #[doc = ""]
59 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
60 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
61 #[wasm_bindgen(method, getter = "module")]
62 pub fn get_module(this: &GpuVertexState) -> GpuShaderModule;
63 #[cfg(web_sys_unstable_apis)]
64 #[cfg(feature = "GpuShaderModule")]
65 #[doc = "Change the `module` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "module")]
72 pub fn set_module(this: &GpuVertexState, val: &GpuShaderModule);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `buffers` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "buffers")]
81 pub fn get_buffers(this: &GpuVertexState) -> Option<::js_sys::Array>;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `buffers` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"]
86 #[doc = ""]
87 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "buffers")]
90 pub fn set_buffers(this: &GpuVertexState, val: &::wasm_bindgen::JsValue);
91}
92#[cfg(web_sys_unstable_apis)]
93impl GpuVertexState {
94 #[cfg(feature = "GpuShaderModule")]
95 #[doc = "Construct a new `GpuVertexState`."]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"]
98 #[doc = ""]
99 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
100 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
101 pub fn new(module: &GpuShaderModule) -> Self {
102 #[allow(unused_mut)]
103 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
104 ret.set_module(module);
105 ret
106 }
107 #[cfg(web_sys_unstable_apis)]
108 #[deprecated = "Use `set_constants()` instead."]
109 pub fn constants(&mut self, val: &::js_sys::Object) -> &mut Self {
110 self.set_constants(val);
111 self
112 }
113 #[cfg(web_sys_unstable_apis)]
114 #[deprecated = "Use `set_entry_point()` instead."]
115 pub fn entry_point(&mut self, val: &str) -> &mut Self {
116 self.set_entry_point(val);
117 self
118 }
119 #[cfg(web_sys_unstable_apis)]
120 #[cfg(feature = "GpuShaderModule")]
121 #[deprecated = "Use `set_module()` instead."]
122 pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self {
123 self.set_module(val);
124 self
125 }
126 #[cfg(web_sys_unstable_apis)]
127 #[deprecated = "Use `set_buffers()` instead."]
128 pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
129 self.set_buffers(val);
130 self
131 }
132}