web_sys/features/
gen_GpuStorageTextureBindingLayout.rs

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