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