web_sys/features/
gen_GpuBuffer.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 = GPUBuffer , typescript_type = "GPUBuffer")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuBuffer` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
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 GpuBuffer;
19    #[cfg(web_sys_unstable_apis)]
20    # [wasm_bindgen (structural , method , getter , js_class = "GPUBuffer" , js_name = size)]
21    #[doc = "Getter for the `size` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/size)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
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 size(this: &GpuBuffer) -> f64;
30    #[cfg(web_sys_unstable_apis)]
31    # [wasm_bindgen (structural , method , getter , js_class = "GPUBuffer" , js_name = usage)]
32    #[doc = "Getter for the `usage` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/usage)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
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 usage(this: &GpuBuffer) -> u32;
41    #[cfg(web_sys_unstable_apis)]
42    #[cfg(feature = "GpuBufferMapState")]
43    # [wasm_bindgen (structural , method , getter , js_class = "GPUBuffer" , js_name = mapState)]
44    #[doc = "Getter for the `mapState` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapState)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferMapState`*"]
49    #[doc = ""]
50    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
52    pub fn map_state(this: &GpuBuffer) -> GpuBufferMapState;
53    #[cfg(web_sys_unstable_apis)]
54    # [wasm_bindgen (structural , method , getter , js_class = "GPUBuffer" , js_name = label)]
55    #[doc = "Getter for the `label` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/label)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
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    pub fn label(this: &GpuBuffer) -> ::alloc::string::String;
64    #[cfg(web_sys_unstable_apis)]
65    # [wasm_bindgen (structural , method , setter , js_class = "GPUBuffer" , js_name = label)]
66    #[doc = "Setter for the `label` field of this object."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/label)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
71    #[doc = ""]
72    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
74    pub fn set_label(this: &GpuBuffer, value: &str);
75    #[cfg(web_sys_unstable_apis)]
76    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = destroy)]
77    #[doc = "The `destroy()` method."]
78    #[doc = ""]
79    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/destroy)"]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
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 destroy(this: &GpuBuffer);
86    #[cfg(web_sys_unstable_apis)]
87    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
88    #[doc = "The `getMappedRange()` method."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
93    #[doc = ""]
94    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
96    pub fn get_mapped_range(this: &GpuBuffer) -> Result<::js_sys::ArrayBuffer, JsValue>;
97    #[cfg(web_sys_unstable_apis)]
98    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
99    #[doc = "The `getMappedRange()` method."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
104    #[doc = ""]
105    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
107    pub fn get_mapped_range_with_u32(
108        this: &GpuBuffer,
109        offset: u32,
110    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
111    #[cfg(web_sys_unstable_apis)]
112    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
113    #[doc = "The `getMappedRange()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
118    #[doc = ""]
119    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121    pub fn get_mapped_range_with_f64(
122        this: &GpuBuffer,
123        offset: f64,
124    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
125    #[cfg(web_sys_unstable_apis)]
126    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
127    #[doc = "The `getMappedRange()` method."]
128    #[doc = ""]
129    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
132    #[doc = ""]
133    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
134    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
135    pub fn get_mapped_range_with_u32_and_u32(
136        this: &GpuBuffer,
137        offset: u32,
138        size: u32,
139    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
140    #[cfg(web_sys_unstable_apis)]
141    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
142    #[doc = "The `getMappedRange()` method."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
147    #[doc = ""]
148    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
149    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
150    pub fn get_mapped_range_with_f64_and_u32(
151        this: &GpuBuffer,
152        offset: f64,
153        size: u32,
154    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
155    #[cfg(web_sys_unstable_apis)]
156    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
157    #[doc = "The `getMappedRange()` method."]
158    #[doc = ""]
159    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
160    #[doc = ""]
161    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
162    #[doc = ""]
163    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
164    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
165    pub fn get_mapped_range_with_u32_and_f64(
166        this: &GpuBuffer,
167        offset: u32,
168        size: f64,
169    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
170    #[cfg(web_sys_unstable_apis)]
171    # [wasm_bindgen (catch , method , structural , js_class = "GPUBuffer" , js_name = getMappedRange)]
172    #[doc = "The `getMappedRange()` method."]
173    #[doc = ""]
174    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/getMappedRange)"]
175    #[doc = ""]
176    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
177    #[doc = ""]
178    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
179    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
180    pub fn get_mapped_range_with_f64_and_f64(
181        this: &GpuBuffer,
182        offset: f64,
183        size: f64,
184    ) -> Result<::js_sys::ArrayBuffer, JsValue>;
185    #[cfg(web_sys_unstable_apis)]
186    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
187    #[doc = "The `mapAsync()` method."]
188    #[doc = ""]
189    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
190    #[doc = ""]
191    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
192    #[doc = ""]
193    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
194    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
195    pub fn map_async(this: &GpuBuffer, mode: u32) -> ::js_sys::Promise;
196    #[cfg(web_sys_unstable_apis)]
197    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
198    #[doc = "The `mapAsync()` method."]
199    #[doc = ""]
200    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
201    #[doc = ""]
202    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
203    #[doc = ""]
204    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
205    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
206    pub fn map_async_with_u32(this: &GpuBuffer, mode: u32, offset: u32) -> ::js_sys::Promise;
207    #[cfg(web_sys_unstable_apis)]
208    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
209    #[doc = "The `mapAsync()` method."]
210    #[doc = ""]
211    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
212    #[doc = ""]
213    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
214    #[doc = ""]
215    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
216    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
217    pub fn map_async_with_f64(this: &GpuBuffer, mode: u32, offset: f64) -> ::js_sys::Promise;
218    #[cfg(web_sys_unstable_apis)]
219    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
220    #[doc = "The `mapAsync()` method."]
221    #[doc = ""]
222    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
223    #[doc = ""]
224    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
225    #[doc = ""]
226    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
227    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
228    pub fn map_async_with_u32_and_u32(
229        this: &GpuBuffer,
230        mode: u32,
231        offset: u32,
232        size: u32,
233    ) -> ::js_sys::Promise;
234    #[cfg(web_sys_unstable_apis)]
235    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
236    #[doc = "The `mapAsync()` method."]
237    #[doc = ""]
238    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
239    #[doc = ""]
240    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
241    #[doc = ""]
242    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
243    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
244    pub fn map_async_with_f64_and_u32(
245        this: &GpuBuffer,
246        mode: u32,
247        offset: f64,
248        size: u32,
249    ) -> ::js_sys::Promise;
250    #[cfg(web_sys_unstable_apis)]
251    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
252    #[doc = "The `mapAsync()` method."]
253    #[doc = ""]
254    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
255    #[doc = ""]
256    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
257    #[doc = ""]
258    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
259    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
260    pub fn map_async_with_u32_and_f64(
261        this: &GpuBuffer,
262        mode: u32,
263        offset: u32,
264        size: f64,
265    ) -> ::js_sys::Promise;
266    #[cfg(web_sys_unstable_apis)]
267    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = mapAsync)]
268    #[doc = "The `mapAsync()` method."]
269    #[doc = ""]
270    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/mapAsync)"]
271    #[doc = ""]
272    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
273    #[doc = ""]
274    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
275    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
276    pub fn map_async_with_f64_and_f64(
277        this: &GpuBuffer,
278        mode: u32,
279        offset: f64,
280        size: f64,
281    ) -> ::js_sys::Promise;
282    #[cfg(web_sys_unstable_apis)]
283    # [wasm_bindgen (method , structural , js_class = "GPUBuffer" , js_name = unmap)]
284    #[doc = "The `unmap()` method."]
285    #[doc = ""]
286    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GPUBuffer/unmap)"]
287    #[doc = ""]
288    #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`*"]
289    #[doc = ""]
290    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
291    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
292    pub fn unmap(this: &GpuBuffer);
293}