web_sys/features/
gen_GpuStorageTextureBindingLayout.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(
9 extends = "::js_sys::Object",
10 js_name = "GPUStorageTextureBindingLayout"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `GpuStorageTextureBindingLayout` dictionary."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`*"]
16 #[doc = ""]
17 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19 pub type GpuStorageTextureBindingLayout;
20 #[cfg(web_sys_unstable_apis)]
21 #[cfg(feature = "GpuStorageTextureAccess")]
22 #[doc = "Get the `access` field of this object."]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"]
25 #[doc = ""]
26 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
27 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
28 #[wasm_bindgen(method, getter = "access")]
29 pub fn get_access(this: &GpuStorageTextureBindingLayout) -> Option<GpuStorageTextureAccess>;
30 #[cfg(web_sys_unstable_apis)]
31 #[cfg(feature = "GpuStorageTextureAccess")]
32 #[doc = "Change the `access` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"]
35 #[doc = ""]
36 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
38 #[wasm_bindgen(method, setter = "access")]
39 pub fn set_access(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess);
40 #[cfg(web_sys_unstable_apis)]
41 #[cfg(feature = "GpuTextureFormat")]
42 #[doc = "Get the `format` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"]
45 #[doc = ""]
46 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
47 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
48 #[wasm_bindgen(method, getter = "format")]
49 pub fn get_format(this: &GpuStorageTextureBindingLayout) -> GpuTextureFormat;
50 #[cfg(web_sys_unstable_apis)]
51 #[cfg(feature = "GpuTextureFormat")]
52 #[doc = "Change the `format` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"]
55 #[doc = ""]
56 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
58 #[wasm_bindgen(method, setter = "format")]
59 pub fn set_format(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat);
60 #[cfg(web_sys_unstable_apis)]
61 #[cfg(feature = "GpuTextureViewDimension")]
62 #[doc = "Get the `viewDimension` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"]
65 #[doc = ""]
66 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
67 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
68 #[wasm_bindgen(method, getter = "viewDimension")]
69 pub fn get_view_dimension(
70 this: &GpuStorageTextureBindingLayout,
71 ) -> Option<GpuTextureViewDimension>;
72 #[cfg(web_sys_unstable_apis)]
73 #[cfg(feature = "GpuTextureViewDimension")]
74 #[doc = "Change the `viewDimension` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, setter = "viewDimension")]
81 pub fn set_view_dimension(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension);
82}
83#[cfg(web_sys_unstable_apis)]
84impl GpuStorageTextureBindingLayout {
85 #[cfg(feature = "GpuTextureFormat")]
86 #[doc = "Construct a new `GpuStorageTextureBindingLayout`."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"]
89 #[doc = ""]
90 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
91 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
92 pub fn new(format: GpuTextureFormat) -> Self {
93 #[allow(unused_mut)]
94 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
95 ret.set_format(format);
96 ret
97 }
98 #[cfg(web_sys_unstable_apis)]
99 #[cfg(feature = "GpuStorageTextureAccess")]
100 #[deprecated = "Use `set_access()` instead."]
101 pub fn access(&mut self, val: GpuStorageTextureAccess) -> &mut Self {
102 self.set_access(val);
103 self
104 }
105 #[cfg(web_sys_unstable_apis)]
106 #[cfg(feature = "GpuTextureFormat")]
107 #[deprecated = "Use `set_format()` instead."]
108 pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self {
109 self.set_format(val);
110 self
111 }
112 #[cfg(web_sys_unstable_apis)]
113 #[cfg(feature = "GpuTextureViewDimension")]
114 #[deprecated = "Use `set_view_dimension()` instead."]
115 pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self {
116 self.set_view_dimension(val);
117 self
118 }
119}