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 = GPUTextureBindingLayout)]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuTextureBindingLayout` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"]
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 GpuTextureBindingLayout;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl GpuTextureBindingLayout {
19     #[doc = "Construct a new `GpuTextureBindingLayout`."]
20     #[doc = ""]
21     #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"]
22     #[doc = ""]
23     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
new() -> Self25     pub fn new() -> Self {
26         #[allow(unused_mut)]
27         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28         ret
29     }
30     #[cfg(web_sys_unstable_apis)]
31     #[doc = "Change the `multisampled` field of this object."]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"]
34     #[doc = ""]
35     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
36     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
multisampled(&mut self, val: bool) -> &mut Self37     pub fn multisampled(&mut self, val: bool) -> &mut Self {
38         use wasm_bindgen::JsValue;
39         let r = ::js_sys::Reflect::set(
40             self.as_ref(),
41             &JsValue::from("multisampled"),
42             &JsValue::from(val),
43         );
44         debug_assert!(
45             r.is_ok(),
46             "setting properties should never fail on our dictionary objects"
47         );
48         let _ = r;
49         self
50     }
51     #[cfg(web_sys_unstable_apis)]
52     #[cfg(feature = "GpuTextureSampleType")]
53     #[doc = "Change the `sampleType` field of this object."]
54     #[doc = ""]
55     #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"]
56     #[doc = ""]
57     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
58     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
sample_type(&mut self, val: GpuTextureSampleType) -> &mut Self59     pub fn sample_type(&mut self, val: GpuTextureSampleType) -> &mut Self {
60         use wasm_bindgen::JsValue;
61         let r = ::js_sys::Reflect::set(
62             self.as_ref(),
63             &JsValue::from("sampleType"),
64             &JsValue::from(val),
65         );
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     #[cfg(feature = "GpuTextureViewDimension")]
75     #[doc = "Change the `viewDimension` field of this object."]
76     #[doc = ""]
77     #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"]
78     #[doc = ""]
79     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
80     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self81     pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self {
82         use wasm_bindgen::JsValue;
83         let r = ::js_sys::Reflect::set(
84             self.as_ref(),
85             &JsValue::from("viewDimension"),
86             &JsValue::from(val),
87         );
88         debug_assert!(
89             r.is_ok(),
90             "setting properties should never fail on our dictionary objects"
91         );
92         let _ = r;
93         self
94     }
95 }
96 #[cfg(web_sys_unstable_apis)]
97 impl Default for GpuTextureBindingLayout {
default() -> Self98     fn default() -> Self {
99         Self::new()
100     }
101 }
102