web_sys/features/
gen_GpuTexture.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 = GPUTexture , typescript_type = "GPUTexture")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `GpuTexture` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type GpuTexture;
19 #[cfg(web_sys_unstable_apis)]
20 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = width)]
21 #[doc = "Getter for the `width` field of this object."]
22 #[doc = ""]
23 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/width)"]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
26 #[doc = ""]
27 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
28 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
29 pub fn width(this: &GpuTexture) -> u32;
30 #[cfg(web_sys_unstable_apis)]
31 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = height)]
32 #[doc = "Getter for the `height` field of this object."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/height)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
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)*"]
40 pub fn height(this: &GpuTexture) -> u32;
41 #[cfg(web_sys_unstable_apis)]
42 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = depthOrArrayLayers)]
43 #[doc = "Getter for the `depthOrArrayLayers` field of this object."]
44 #[doc = ""]
45 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/depthOrArrayLayers)"]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
48 #[doc = ""]
49 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
51 pub fn depth_or_array_layers(this: &GpuTexture) -> u32;
52 #[cfg(web_sys_unstable_apis)]
53 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = mipLevelCount)]
54 #[doc = "Getter for the `mipLevelCount` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/mipLevelCount)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
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)*"]
62 pub fn mip_level_count(this: &GpuTexture) -> u32;
63 #[cfg(web_sys_unstable_apis)]
64 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = sampleCount)]
65 #[doc = "Getter for the `sampleCount` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/sampleCount)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
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 pub fn sample_count(this: &GpuTexture) -> u32;
74 #[cfg(web_sys_unstable_apis)]
75 #[cfg(feature = "GpuTextureDimension")]
76 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = dimension)]
77 #[doc = "Getter for the `dimension` field of this object."]
78 #[doc = ""]
79 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/dimension)"]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureDimension`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 pub fn dimension(this: &GpuTexture) -> GpuTextureDimension;
86 #[cfg(web_sys_unstable_apis)]
87 #[cfg(feature = "GpuTextureFormat")]
88 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = format)]
89 #[doc = "Getter for the `format` field of this object."]
90 #[doc = ""]
91 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/format)"]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureFormat`*"]
94 #[doc = ""]
95 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
96 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
97 pub fn format(this: &GpuTexture) -> GpuTextureFormat;
98 #[cfg(web_sys_unstable_apis)]
99 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = usage)]
100 #[doc = "Getter for the `usage` field of this object."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/usage)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
105 #[doc = ""]
106 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
107 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
108 pub fn usage(this: &GpuTexture) -> u32;
109 #[cfg(web_sys_unstable_apis)]
110 # [wasm_bindgen (structural , method , getter , js_class = "GPUTexture" , js_name = label)]
111 #[doc = "Getter for the `label` field of this object."]
112 #[doc = ""]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/label)"]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
116 #[doc = ""]
117 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
118 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
119 pub fn label(this: &GpuTexture) -> ::alloc::string::String;
120 #[cfg(web_sys_unstable_apis)]
121 # [wasm_bindgen (structural , method , setter , js_class = "GPUTexture" , js_name = label)]
122 #[doc = "Setter for the `label` field of this object."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/label)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
127 #[doc = ""]
128 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
129 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
130 pub fn set_label(this: &GpuTexture, value: &str);
131 #[cfg(web_sys_unstable_apis)]
132 #[cfg(feature = "GpuTextureView")]
133 # [wasm_bindgen (catch , method , structural , js_class = "GPUTexture" , js_name = createView)]
134 #[doc = "The `createView()` method."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/createView)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureView`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 pub fn create_view(this: &GpuTexture) -> Result<GpuTextureView, JsValue>;
143 #[cfg(web_sys_unstable_apis)]
144 #[cfg(all(feature = "GpuTextureView", feature = "GpuTextureViewDescriptor",))]
145 # [wasm_bindgen (catch , method , structural , js_class = "GPUTexture" , js_name = createView)]
146 #[doc = "The `createView()` method."]
147 #[doc = ""]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/createView)"]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`, `GpuTextureView`, `GpuTextureViewDescriptor`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 pub fn create_view_with_descriptor(
155 this: &GpuTexture,
156 descriptor: &GpuTextureViewDescriptor,
157 ) -> Result<GpuTextureView, JsValue>;
158 #[cfg(web_sys_unstable_apis)]
159 # [wasm_bindgen (method , structural , js_class = "GPUTexture" , js_name = destroy)]
160 #[doc = "The `destroy()` method."]
161 #[doc = ""]
162 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUTexture/destroy)"]
163 #[doc = ""]
164 #[doc = "*This API requires the following crate features to be activated: `GpuTexture`*"]
165 #[doc = ""]
166 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
167 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
168 pub fn destroy(this: &GpuTexture);
169}