1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[cfg(web_sys_unstable_apis)] 5 #[wasm_bindgen] 6 extern "C" { 7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUVertexState)] 8 #[derive(Debug, Clone, PartialEq, Eq)] 9 #[doc = "The `GpuVertexState` dictionary."] 10 #[doc = ""] 11 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] 12 #[doc = ""] 13 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 14 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] 15 pub type GpuVertexState; 16 } 17 #[cfg(web_sys_unstable_apis)] 18 impl GpuVertexState { 19 #[cfg(feature = "GpuShaderModule")] 20 #[doc = "Construct a new `GpuVertexState`."] 21 #[doc = ""] 22 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] 23 #[doc = ""] 24 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 25 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] new(entry_point: &str, module: &GpuShaderModule) -> Self26 pub fn new(entry_point: &str, module: &GpuShaderModule) -> Self { 27 #[allow(unused_mut)] 28 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 29 ret.entry_point(entry_point); 30 ret.module(module); 31 ret 32 } 33 #[cfg(web_sys_unstable_apis)] 34 #[doc = "Change the `entryPoint` field of this object."] 35 #[doc = ""] 36 #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] 37 #[doc = ""] 38 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] 39 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] entry_point(&mut self, val: &str) -> &mut Self40 pub fn entry_point(&mut self, val: &str) -> &mut Self { 41 use wasm_bindgen::JsValue; 42 let r = ::js_sys::Reflect::set( 43 self.as_ref(), 44 &JsValue::from("entryPoint"), 45 &JsValue::from(val), 46 ); 47 debug_assert!( 48 r.is_ok(), 49 "setting properties should never fail on our dictionary objects" 50 ); 51 let _ = r; 52 self 53 } 54 #[cfg(web_sys_unstable_apis)] 55 #[cfg(feature = "GpuShaderModule")] 56 #[doc = "Change the `module` field of this object."] 57 #[doc = ""] 58 #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] module(&mut self, val: &GpuShaderModule) -> &mut Self62 pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { 63 use wasm_bindgen::JsValue; 64 let r = 65 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("module"), &JsValue::from(val)); 66 debug_assert!( 67 r.is_ok(), 68 "setting properties should never fail on our dictionary objects" 69 ); 70 let _ = r; 71 self 72 } 73 #[cfg(web_sys_unstable_apis)] 74 #[doc = "Change 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)*"] buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self80 pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 81 use wasm_bindgen::JsValue; 82 let r = ::js_sys::Reflect::set( 83 self.as_ref(), 84 &JsValue::from("buffers"), 85 &JsValue::from(val), 86 ); 87 debug_assert!( 88 r.is_ok(), 89 "setting properties should never fail on our dictionary objects" 90 ); 91 let _ = r; 92 self 93 } 94 } 95